Type:
Task
Priority:
Major
Resolution:
Fixed
Sprint:
10.1.6-1, 10.1.6-2, 10.1.7-1, 10.2.0-5, 10.2.0-6, 5.5.51 & 10.2.2
MDEV-7829 and MDEV-7363 where attempts to work around the implementation of analyze table because holding a read lock only on the entire table while gathers statistics. This can be up to an hour or so on larger tables as witnessed in production databases. This level of total read only on a table isn't acceptable.
MDEV-7196 suggested by jplindst indicated that perhaps a full scan is more appropriate to give better statistics. Obviously this isn't going to help the locking scenario at all.
So perhaps, instead of locking the entire table, the analyze table takes a full table scan in incremental blocks. These block sizes should try to scale to something that keeps the lock time less that a goal time, a new variable max_analyze_table_lock_time (locks can be dropped in analyze table gets there too soon). Analyze table being a long running operation should drop to read committed (or uncommitted?) mode to keep the undo logs from growing because of the intensive read operations.
{"report":{"fcp":866,"ttfb":228,"pageVisibility":"visible","entityId":50747,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"446d378d-a95c-402e-8a49-ee3402966a8d","navigationType":0,"readyForUser":940.5999999046326,"redirectCount":0,"resourceLoadedEnd":513,"resourceLoadedStart":236,"resourceTiming":[{"duration":64.2999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":236,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":236,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":300.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":64.40000009536743,"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":236.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":236.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":300.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":141.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":236.5,"connectEnd":236.5,"connectStart":236.5,"domainLookupEnd":236.5,"domainLookupStart":236.5,"fetchStart":236.5,"redirectEnd":0,"redirectStart":0,"requestStart":304.2999997138977,"responseEnd":377.7999997138977,"responseStart":319,"secureConnectionStart":236.5},{"duration":160.59999990463257,"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":236.69999980926514,"connectEnd":236.69999980926514,"connectStart":236.69999980926514,"domainLookupEnd":236.69999980926514,"domainLookupStart":236.69999980926514,"fetchStart":236.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":305,"responseEnd":397.2999997138977,"responseStart":323.7999997138977,"secureConnectionStart":236.69999980926514},{"duration":112.10000038146973,"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":236.89999961853027,"connectEnd":236.89999961853027,"connectStart":236.89999961853027,"domainLookupEnd":236.89999961853027,"domainLookupStart":236.89999961853027,"fetchStart":236.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":306.19999980926514,"responseEnd":349,"responseStart":348.2999997138977,"secureConnectionStart":236.89999961853027},{"duration":111.09999990463257,"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":237.19999980926514,"connectEnd":237.19999980926514,"connectStart":237.19999980926514,"domainLookupEnd":237.19999980926514,"domainLookupStart":237.19999980926514,"fetchStart":237.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":307.5,"responseEnd":348.2999997138977,"responseStart":347.3999996185303,"secureConnectionStart":237.19999980926514},{"duration":119.59999990463257,"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":237.2999997138977,"connectEnd":237.2999997138977,"connectStart":237.2999997138977,"domainLookupEnd":237.2999997138977,"domainLookupStart":237.2999997138977,"fetchStart":237.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":309.59999990463257,"responseEnd":356.8999996185303,"responseStart":356.09999990463257,"secureConnectionStart":237.2999997138977},{"duration":71.90000009536743,"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":237.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":309.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":127.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":237.59999990463257,"connectEnd":237.59999990463257,"connectStart":237.59999990463257,"domainLookupEnd":237.59999990463257,"domainLookupStart":237.59999990463257,"fetchStart":237.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":312,"responseEnd":365,"responseStart":364.09999990463257,"secureConnectionStart":237.59999990463257},{"duration":72,"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":237.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":309.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":130.80000019073486,"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":237.89999961853027,"connectEnd":237.89999961853027,"connectStart":237.89999961853027,"domainLookupEnd":237.89999961853027,"domainLookupStart":237.89999961853027,"fetchStart":237.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":313.8999996185303,"responseEnd":368.69999980926514,"responseStart":365.7999997138977,"secureConnectionStart":237.89999961853027},{"duration":261.8999996185303,"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":250.5,"connectEnd":250.5,"connectStart":250.5,"domainLookupEnd":250.5,"domainLookupStart":250.5,"fetchStart":250.5,"redirectEnd":0,"redirectStart":0,"requestStart":373,"responseEnd":512.3999996185303,"responseStart":507.7999997138977,"secureConnectionStart":250.5},{"duration":248.10000038146973,"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":264.8999996185303,"connectEnd":264.8999996185303,"connectStart":264.8999996185303,"domainLookupEnd":264.8999996185303,"domainLookupStart":264.8999996185303,"fetchStart":264.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":373.5,"responseEnd":513,"responseStart":508.5,"secureConnectionStart":264.8999996185303},{"duration":231.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":603.1999998092651,"connectEnd":603.1999998092651,"connectStart":603.1999998092651,"domainLookupEnd":603.1999998092651,"domainLookupStart":603.1999998092651,"fetchStart":603.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":795.5,"responseEnd":834.2999997138977,"responseStart":833.3999996185303,"secureConnectionStart":603.1999998092651},{"duration":145.2999997138977,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":835.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":835.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":980.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":51.10000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":867.8999996185303,"connectEnd":867.8999996185303,"connectStart":867.8999996185303,"domainLookupEnd":867.8999996185303,"domainLookupStart":867.8999996185303,"fetchStart":867.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":883.5999999046326,"responseEnd":919,"responseStart":918.0999999046326,"secureConnectionStart":867.8999996185303}],"fetchStart":0,"domainLookupStart":15,"domainLookupEnd":29,"connectStart":29,"connectEnd":53,"secureConnectionStart":40,"requestStart":54,"responseStart":228,"responseEnd":265,"domLoading":232,"domInteractive":1018,"domContentLoadedEventStart":1018,"domContentLoadedEventEnd":1077,"domComplete":1321,"loadEventStart":1321,"loadEventEnd":1322,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":986.6999998092651},{"name":"bigPipe.sidebar-id.end","time":988.2999997138977},{"name":"bigPipe.activity-panel-pipe-id.start","time":988.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":990},{"name":"activityTabFullyLoaded","time":1097.5999999046326}],"measures":[],"correlationId":"d1aa55911176ef","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":17,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
done with innodb relaxed locks