-
Bug
-
-
Blocker
-
Resolution:
Fixed
-
10.6
-
-
-
(Filing based on investigation of a support case)
When a statement uses a partitioned table, there is O(#partitions_in_table) overhead even if the statement actually touches O(1) partitions.
We always had this overhead (there is MDEV-20250 to get rid of it), but in 10.6 it got larger.
In order to observe the overhead increase one needs:
- A table with a lot (thousands) or partitions.
- A statement that touches one or a few rows in one/few partitions. The statement must be sufficiently lightweight so the extra overhead is visible.
- The above statement must be invoked many times by the embedding statement. This way, the overhead adds up and can be observed.
The total slowdown observed was around 40%.
Causes
- One known reason is handler_stats_disable() and related calls which were added
by MDEV-31558. It has unnecessary loops that go through all partitions.
Overhead that already existed in 10.5:
- Calls to extra(HA_EXTRA_.._CHILDREN). These are no-ops if one is not using MERGE engine.
- Calls to extra(HA_EXTRA_*_KEYREAD). These only make sense for the partitions that are touched by the query
{"report":{"fcp":901.1999998092651,"ttfb":223.69999980926514,"pageVisibility":"visible","entityId":127996,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"1986bc4d-1c52-4553-bb22-094a6fac4daa","navigationType":0,"readyForUser":980,"redirectCount":0,"resourceLoadedEnd":609.7999999523163,"resourceLoadedStart":229.19999980926514,"resourceTiming":[{"duration":14.600000143051147,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":229.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":229.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":243.79999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":15.099999904632568,"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":229.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":229.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":244.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":249.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":229.59999990463257,"connectEnd":229.59999990463257,"connectStart":229.59999990463257,"domainLookupEnd":229.59999990463257,"domainLookupStart":229.59999990463257,"fetchStart":229.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":250.29999995231628,"responseEnd":478.89999985694885,"responseStart":276.89999985694885,"secureConnectionStart":229.59999990463257},{"duration":380.10000014305115,"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":229.69999980926514,"connectEnd":229.69999980926514,"connectStart":229.69999980926514,"domainLookupEnd":229.69999980926514,"domainLookupStart":229.69999980926514,"fetchStart":229.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":250.5,"responseEnd":609.7999999523163,"responseStart":279.19999980926514,"secureConnectionStart":229.69999980926514},{"duration":54.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":229.79999995231628,"connectEnd":229.79999995231628,"connectStart":229.79999995231628,"domainLookupEnd":229.79999995231628,"domainLookupStart":229.79999995231628,"fetchStart":229.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":250.59999990463257,"responseEnd":283.89999985694885,"responseStart":278.2999999523163,"secureConnectionStart":229.79999995231628},{"duration":59.700000047683716,"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":229.89999985694885,"connectEnd":229.89999985694885,"connectStart":229.89999985694885,"domainLookupEnd":229.89999985694885,"domainLookupStart":229.89999985694885,"fetchStart":229.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":251.19999980926514,"responseEnd":289.59999990463257,"responseStart":285.19999980926514,"secureConnectionStart":229.89999985694885},{"duration":59.89999985694885,"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":230,"connectEnd":230,"connectStart":230,"domainLookupEnd":230,"domainLookupStart":230,"fetchStart":230,"redirectEnd":0,"redirectStart":0,"requestStart":251.29999995231628,"responseEnd":289.89999985694885,"responseStart":286.09999990463257,"secureConnectionStart":230},{"duration":19.90000009536743,"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":230.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":250,"responseStart":0,"secureConnectionStart":0},{"duration":67.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":230.19999980926514,"connectEnd":230.19999980926514,"connectStart":230.19999980926514,"domainLookupEnd":230.19999980926514,"domainLookupStart":230.19999980926514,"fetchStart":230.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":255.59999990463257,"responseEnd":297.59999990463257,"responseStart":290.5,"secureConnectionStart":230.19999980926514},{"duration":20.799999952316284,"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":230.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":251.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":68.79999995231628,"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":230.39999985694885,"connectEnd":230.39999985694885,"connectStart":230.39999985694885,"domainLookupEnd":230.39999985694885,"domainLookupStart":230.39999985694885,"fetchStart":230.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":256.7999999523163,"responseEnd":299.19999980926514,"responseStart":291.69999980926514,"secureConnectionStart":230.39999985694885},{"duration":350.2000000476837,"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":231.29999995231628,"connectEnd":231.29999995231628,"connectStart":231.29999995231628,"domainLookupEnd":231.29999995231628,"domainLookupStart":231.29999995231628,"fetchStart":231.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":269.39999985694885,"responseEnd":581.5,"responseStart":576.0999999046326,"secureConnectionStart":231.29999995231628},{"duration":345.89999985694885,"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":236,"connectEnd":236,"connectStart":236,"domainLookupEnd":236,"domainLookupStart":236,"fetchStart":236,"redirectEnd":0,"redirectStart":0,"requestStart":305.59999990463257,"responseEnd":581.8999998569489,"responseStart":577.6999998092651,"secureConnectionStart":236},{"duration":177.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":641.5999999046326,"connectEnd":641.5999999046326,"connectStart":641.5999999046326,"domainLookupEnd":641.5999999046326,"domainLookupStart":641.5999999046326,"fetchStart":641.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":786.7999999523163,"responseEnd":818.8999998569489,"responseStart":817.2999999523163,"secureConnectionStart":641.5999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":66,"responseStart":223,"responseEnd":230,"domLoading":227,"domInteractive":1073,"domContentLoadedEventStart":1073,"domContentLoadedEventEnd":1126,"domComplete":1786,"loadEventStart":1786,"loadEventEnd":1786,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1018.3999998569489},{"name":"bigPipe.sidebar-id.end","time":1019.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1019.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":1022},{"name":"activityTabFullyLoaded","time":1133.5}],"measures":[],"correlationId":"9eda00c15f4301","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":90,"dbReadsTimeInMs":17,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}