Type:
Task
Priority:
Minor
Resolution:
Unresolved
Fix Version/s:
None
When optimizer considers different indexes for a query, for every index it needs to know
what columns are part of the index
the index cardinality
records_in_range — number of values within a specific constant range
Note that the first question doesn't need the index to be created. And the other two can be answered from EITS, so they don't need an index either.
So, the optimizer should, technically, be able to create an execution plan that uses an index, even if the index does not exist! This could be incorporated into a new explain mode, say EXPLAIN SUGGEST_INDEXES that will return what indexes (if created) would reduce the query execution cost and how.
{"report":{"fcp":944.8999996185303,"ttfb":263.5999994277954,"pageVisibility":"visible","entityId":71041,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"149205ee-454d-47cc-82c6-6731af2d3fcc","navigationType":0,"readyForUser":1012.3999996185303,"redirectCount":0,"resourceLoadedEnd":1035.0999994277954,"resourceLoadedStart":268.69999980926514,"resourceTiming":[{"duration":145.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":268.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":268.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":414.5,"responseStart":0,"secureConnectionStart":0},{"duration":145.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":269,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":414.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":155.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":269.19999980926514,"connectEnd":269.19999980926514,"connectStart":269.19999980926514,"domainLookupEnd":269.19999980926514,"domainLookupStart":269.19999980926514,"fetchStart":269.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":269.19999980926514,"responseEnd":425,"responseStart":425,"secureConnectionStart":269.19999980926514},{"duration":239.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":269.3999996185303,"connectEnd":269.3999996185303,"connectStart":269.3999996185303,"domainLookupEnd":269.3999996185303,"domainLookupStart":269.3999996185303,"fetchStart":269.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":269.3999996185303,"responseEnd":508.5,"responseStart":508.3999996185303,"secureConnectionStart":269.3999996185303},{"duration":242.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":269.5999994277954,"connectEnd":269.5999994277954,"connectStart":269.5999994277954,"domainLookupEnd":269.5999994277954,"domainLookupStart":269.5999994277954,"fetchStart":269.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":269.5999994277954,"responseEnd":512.2999992370605,"responseStart":512.2999992370605,"secureConnectionStart":269.5999994277954},{"duration":243.0999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":269.69999980926514,"connectEnd":269.69999980926514,"connectStart":269.69999980926514,"domainLookupEnd":269.69999980926514,"domainLookupStart":269.69999980926514,"fetchStart":269.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":269.69999980926514,"responseEnd":512.7999992370605,"responseStart":512.7999992370605,"secureConnectionStart":269.69999980926514},{"duration":243.0999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":270,"connectEnd":270,"connectStart":270,"domainLookupEnd":270,"domainLookupStart":270,"fetchStart":270,"redirectEnd":0,"redirectStart":0,"requestStart":270,"responseEnd":513.0999994277954,"responseStart":513.0999994277954,"secureConnectionStart":270},{"duration":299.9000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":270.0999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":570,"responseStart":0,"secureConnectionStart":0},{"duration":243.39999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":270.19999980926514,"connectEnd":270.19999980926514,"connectStart":270.19999980926514,"domainLookupEnd":270.19999980926514,"domainLookupStart":270.19999980926514,"fetchStart":270.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":270.19999980926514,"responseEnd":513.5999994277954,"responseStart":513.5999994277954,"secureConnectionStart":270.19999980926514},{"duration":299.6000003814697,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":270.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":570,"responseStart":0,"secureConnectionStart":0},{"duration":243.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":270.5999994277954,"connectEnd":270.5999994277954,"connectStart":270.5999994277954,"domainLookupEnd":270.5999994277954,"domainLookupStart":270.5999994277954,"fetchStart":270.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":270.5999994277954,"responseEnd":514.2999992370605,"responseStart":514.2999992370605,"secureConnectionStart":270.5999994277954},{"duration":706.2999992370605,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":276,"connectEnd":276,"connectStart":276,"domainLookupEnd":276,"domainLookupStart":276,"fetchStart":276,"redirectEnd":0,"redirectStart":0,"requestStart":276,"responseEnd":982.2999992370605,"responseStart":982.1999998092651,"secureConnectionStart":276},{"duration":707.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":276,"connectEnd":276,"connectStart":276,"domainLookupEnd":276,"domainLookupStart":276,"fetchStart":276,"redirectEnd":0,"redirectStart":0,"requestStart":276,"responseEnd":983.3999996185303,"responseStart":983.3999996185303,"secureConnectionStart":276},{"duration":128.89999961853027,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":581.6999998092651,"connectEnd":581.6999998092651,"connectStart":581.6999998092651,"domainLookupEnd":581.6999998092651,"domainLookupStart":581.6999998092651,"fetchStart":581.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":581.6999998092651,"responseEnd":710.5999994277954,"responseStart":710.5999994277954,"secureConnectionStart":581.6999998092651},{"duration":190.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":844.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":844.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1035.0999994277954,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":116,"responseStart":263,"responseEnd":272,"domLoading":266,"domInteractive":1062,"domContentLoadedEventStart":1062,"domContentLoadedEventEnd":1100,"domComplete":2319,"loadEventStart":2319,"loadEventEnd":2321,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1049.8999996185303},{"name":"bigPipe.sidebar-id.end","time":1050.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1050.8999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":1053.3999996185303},{"name":"activityTabFullyLoaded","time":1109.0999994277954}],"measures":[],"correlationId":"e349db995da799","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":89,"dbReadsTimeInMs":9,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}