explain SELECT c_custkey, c_name AS currency2 FROM partsupp LEFT JOIN part ON (
p_partkey = ps_partkey ) JOIN supplier ON (s_suppkey = ps_suppkey) JOIN lineite
m ON ( ps_suppkey = l_suppkey ) JOIN orders ON ( l_orderkey = o_orderkey ) JOIN
customer ON ( o_custkey = c_custkey ) HAVING c_custkey > 150;
In 11.0 shows the table 'part' which should have been eliminated.
This also causes a small degradation in performance.
- is part of
-
MDEV-26974
Improve selectivity and related costs in optimizer
-
-
Closed
{"report":{"fcp":702.1000001430511,"ttfb":138.10000014305115,"pageVisibility":"visible","entityId":118678,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"bc7abbb0-7dc3-4ab5-92f3-5c03cd12b7be","navigationType":0,"readyForUser":753.7999999523163,"redirectCount":0,"resourceLoadedEnd":555.1000001430511,"resourceLoadedStart":143.5,"resourceTiming":[{"duration":9.600000143051147,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":143.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":143.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":153.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":11,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":143.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":143.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":154.79999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":112.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":143.90000009536743,"connectEnd":143.90000009536743,"connectStart":143.90000009536743,"domainLookupEnd":143.90000009536743,"domainLookupStart":143.90000009536743,"fetchStart":143.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":158.90000009536743,"responseEnd":256.5,"responseStart":183.70000004768372,"secureConnectionStart":143.90000009536743},{"duration":45.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":144.10000014305115,"connectEnd":144.10000014305115,"connectStart":144.10000014305115,"domainLookupEnd":144.10000014305115,"domainLookupStart":144.10000014305115,"fetchStart":144.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":160.40000009536743,"responseEnd":189.20000004768372,"responseStart":187.90000009536743,"secureConnectionStart":144.10000014305115},{"duration":130.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":144.10000014305115,"connectEnd":144.10000014305115,"connectStart":144.10000014305115,"domainLookupEnd":144.10000014305115,"domainLookupStart":144.10000014305115,"fetchStart":144.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":159.79999995231628,"responseEnd":274.2999999523163,"responseStart":189.29999995231628,"secureConnectionStart":144.10000014305115},{"duration":48.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":144.29999995231628,"connectEnd":144.29999995231628,"connectStart":144.29999995231628,"domainLookupEnd":144.29999995231628,"domainLookupStart":144.29999995231628,"fetchStart":144.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":161.90000009536743,"responseEnd":192.90000009536743,"responseStart":191.70000004768372,"secureConnectionStart":144.29999995231628},{"duration":17.899999856948853,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":144.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":144.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":162.29999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":61.799999952316284,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":144.40000009536743,"connectEnd":144.40000009536743,"connectStart":144.40000009536743,"domainLookupEnd":144.40000009536743,"domainLookupStart":144.40000009536743,"fetchStart":144.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":164.29999995231628,"responseEnd":206.20000004768372,"responseStart":205.10000014305115,"secureConnectionStart":144.40000009536743},{"duration":62.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":144.5,"connectEnd":144.5,"connectStart":144.5,"domainLookupEnd":144.5,"domainLookupStart":144.5,"fetchStart":144.5,"redirectEnd":0,"redirectStart":0,"requestStart":168.40000009536743,"responseEnd":207.10000014305115,"responseStart":206.40000009536743,"secureConnectionStart":144.5},{"duration":19.700000047683716,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":144.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":144.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":164.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":80,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":144.79999995231628,"connectEnd":144.79999995231628,"connectStart":144.79999995231628,"domainLookupEnd":144.79999995231628,"domainLookupStart":144.79999995231628,"fetchStart":144.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":168.60000014305115,"responseEnd":224.79999995231628,"responseStart":223.29999995231628,"secureConnectionStart":144.79999995231628},{"duration":239.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":153.20000004768372,"connectEnd":153.20000004768372,"connectStart":153.20000004768372,"domainLookupEnd":153.20000004768372,"domainLookupStart":153.20000004768372,"fetchStart":153.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":196.29999995231628,"responseEnd":392.7000000476837,"responseStart":390.7999999523163,"secureConnectionStart":153.20000004768372},{"duration":401.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":153.29999995231628,"connectEnd":153.29999995231628,"connectStart":153.29999995231628,"domainLookupEnd":153.29999995231628,"domainLookupStart":153.29999995231628,"fetchStart":153.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":525.1000001430511,"responseEnd":555.1000001430511,"responseStart":553.4000000953674,"secureConnectionStart":153.29999995231628},{"duration":172.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":450.40000009536743,"connectEnd":450.40000009536743,"connectStart":450.40000009536743,"domainLookupEnd":450.40000009536743,"domainLookupStart":450.40000009536743,"fetchStart":450.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":592.9000000953674,"responseEnd":622.7000000476837,"responseStart":621.2000000476837,"secureConnectionStart":450.40000009536743}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":20,"responseStart":138,"responseEnd":152,"domLoading":142,"domInteractive":800,"domContentLoadedEventStart":800,"domContentLoadedEventEnd":838,"domComplete":1461,"loadEventStart":1461,"loadEventEnd":1461,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":782.9000000953674},{"name":"bigPipe.sidebar-id.end","time":783.6000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":783.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":784.6000001430511},{"name":"activityTabFullyLoaded","time":850.5}],"measures":[],"correlationId":"c7c5f6b4b57f51","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":71,"dbReadsTimeInMs":13,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Some tables where not eliminated when they could have been.
This was caused because HA_KEYREAD_ONLY is not set anymore for InnoDB
clustered index and the elimination code was depending on
field->part_of_key_not_clustered which was not set if HA_KEYREAD_ONLY
is not present.
Fixed by moving out field->part_of_key and
field->part_of_key_not_clustered from under HA_KEYREAD_ONLY (which
they should never have been part of).
The fix exposes issues in extended key code, which took a long time to understand and fix.
The exposed bugs where fixed in another commit