Type:
Task
Priority:
Minor
Resolution:
Fixed
https://github.com/facebook/mysql-5.6
commit e8f0052f9b112dc786bf9b957ed5b16a5749f7fd
commit e8f0052f9b112dc786bf9b957ed5b16a5749f7fd
commit 154c579b828a60722a7d9477fc61868c07453d08
Port v5.1 Prefix Index Queries Optimization
Summary:
Feature: Prefix Index Queries Optimization
Optimize prefix index queries to skip cluster index lookup when possible.
Currently InnoDB will always fetch the clustered index (primary key
index) for all prefix columns in an index, even when the value of a
particular record is smaller than the prefix length. This change
optimizes that case to use the record from the secondary index and avoid
the extra lookup.
Also adds two status vars that track how effective this is:
innodb_secondary_index_triggered_cluster_reads:
Times secondary index lookup triggered cluster lookup.
innodb_secondary_index_triggered_cluster_reads_avoided:
Times prefix optimization avoided triggering cluster lookup.
{"report":{"fcp":1540.2999999523163,"ttfb":528.6000001430511,"pageVisibility":"visible","entityId":46704,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d19c30ac-becb-434f-a3b9-6ff809352b8d","navigationType":0,"readyForUser":1622,"redirectCount":0,"resourceLoadedEnd":1679,"resourceLoadedStart":536,"resourceTiming":[{"duration":426.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":536,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":536,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":962.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":427.09999990463257,"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":536.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":536.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":963.5,"responseStart":0,"secureConnectionStart":0},{"duration":464.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":536.6000001430511,"connectEnd":536.6000001430511,"connectStart":536.6000001430511,"domainLookupEnd":536.6000001430511,"domainLookupStart":536.6000001430511,"fetchStart":536.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":966.5,"responseEnd":1001.1000001430511,"responseStart":978.6000001430511,"secureConnectionStart":536.6000001430511},{"duration":728.5,"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":536.7000000476837,"connectEnd":977.6000001430511,"connectStart":977.6000001430511,"domainLookupEnd":977.6000001430511,"domainLookupStart":977.6000001430511,"fetchStart":536.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":977.7999999523163,"responseEnd":1265.2000000476837,"responseStart":992.2999999523163,"secureConnectionStart":977.6000001430511},{"duration":461.2999999523163,"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":537,"connectEnd":537,"connectStart":537,"domainLookupEnd":537,"domainLookupStart":537,"fetchStart":537,"redirectEnd":0,"redirectStart":0,"requestStart":980.1000001430511,"responseEnd":998.2999999523163,"responseStart":995.7000000476837,"secureConnectionStart":537},{"duration":461.7999999523163,"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":537.1000001430511,"connectEnd":537.1000001430511,"connectStart":537.1000001430511,"domainLookupEnd":537.1000001430511,"domainLookupStart":537.1000001430511,"fetchStart":537.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":981,"responseEnd":998.9000000953674,"responseStart":996.6000001430511,"secureConnectionStart":537.1000001430511},{"duration":467.7000000476837,"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":537.2000000476837,"connectEnd":537.2000000476837,"connectStart":537.2000000476837,"domainLookupEnd":537.2000000476837,"domainLookupStart":537.2000000476837,"fetchStart":537.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":982.7000000476837,"responseEnd":1004.9000000953674,"responseStart":1002.2000000476837,"secureConnectionStart":537.2000000476837},{"duration":444.59999990463257,"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":537.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":537.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":982,"responseStart":0,"secureConnectionStart":0},{"duration":467.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":537.6000001430511,"connectEnd":537.6000001430511,"connectStart":537.6000001430511,"domainLookupEnd":537.6000001430511,"domainLookupStart":537.6000001430511,"fetchStart":537.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":985.2000000476837,"responseEnd":1005.5,"responseStart":1002.9000000953674,"secureConnectionStart":537.6000001430511},{"duration":445.7000000476837,"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":537.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":537.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":983.5,"responseStart":0,"secureConnectionStart":0},{"duration":471.7999999523163,"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":537.9000000953674,"connectEnd":537.9000000953674,"connectStart":537.9000000953674,"domainLookupEnd":537.9000000953674,"domainLookupStart":537.9000000953674,"fetchStart":537.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":986.9000000953674,"responseEnd":1009.7000000476837,"responseStart":1003.9000000953674,"secureConnectionStart":537.9000000953674},{"duration":942,"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":563.7999999523163,"connectEnd":563.7999999523163,"connectStart":563.7999999523163,"domainLookupEnd":563.7999999523163,"domainLookupStart":563.7999999523163,"fetchStart":563.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1487.6000001430511,"responseEnd":1505.7999999523163,"responseStart":1505.1000001430511,"secureConnectionStart":563.7999999523163},{"duration":1115,"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":564,"connectEnd":564,"connectStart":564,"domainLookupEnd":564,"domainLookupStart":564,"fetchStart":564,"redirectEnd":0,"redirectStart":0,"requestStart":1666.4000000953674,"responseEnd":1679,"responseStart":1678.5,"secureConnectionStart":564},{"duration":374.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1149.7999999523163,"connectEnd":1149.7999999523163,"connectStart":1149.7999999523163,"domainLookupEnd":1149.7999999523163,"domainLookupStart":1149.7999999523163,"fetchStart":1149.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1488.2999999523163,"responseEnd":1524.6000001430511,"responseStart":1523.5,"secureConnectionStart":1149.7999999523163},{"duration":201.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1533.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1533.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1735.7000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":362,"responseStart":529,"responseEnd":562,"domLoading":533,"domInteractive":1771,"domContentLoadedEventStart":1771,"domContentLoadedEventEnd":1825,"domComplete":3231,"loadEventStart":3231,"loadEventEnd":3232,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1740.5},{"name":"bigPipe.sidebar-id.end","time":1741.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1741.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1744.9000000953674},{"name":"activityTabFullyLoaded","time":1832.5}],"measures":[],"correlationId":"41afb97858d157","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}