I have a workload that does partitioning manually (largely because at the end of each day I want to 'optimize table' for the previous day's partition to address fragmentation). As a result there's a stored procedure, that prepares a statement of the form "create table if not exists table_20181130 like table_template" and runs it. This procedure is called rather a lot and >99% of the time the table already exists so this doesn't do anything. This has been working great up-to and including MariaDB 10.3.9.
Upon upgrading to 10.3.10 (or 11) I find that performance of my system is abysmal. And this seems to be down to this procedure - the create table if not exists doesn't return immediately like it used to if the table exists and any other query has the table open. I can work around this by looking in information_schema.TABLES and avoiding the 'create table if not exists' if the table already exists - however this feels like a regression to me rather than an intentional change, especially as I don't see anything obviously related in the 10.3.10 ChangeLog.
To recreate; in one terminal execute:
create table if not exists test1 (a int);
|
select sum(a), sleep(60) from test1;
|
... and in another:
create table if not exists test1 (a int);
|
In anything before 10.3.10 the second terminal will complete immediately, but in 10.3.10 (or 11) the second terminal will only complete once the select in the first terminal has done so.
{"report":{"fcp":901.5999999046326,"ttfb":161.90000009536743,"pageVisibility":"visible","entityId":71182,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"d3562ae8-5a9c-44f2-9315-3ce67b931785","navigationType":0,"readyForUser":966.9000000953674,"redirectCount":0,"resourceLoadedEnd":1056.7000000476837,"resourceLoadedStart":167.29999995231628,"resourceTiming":[{"duration":209.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":167.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":167.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":376.5,"responseStart":0,"secureConnectionStart":0},{"duration":208.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":167.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":167.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":376.5,"responseStart":0,"secureConnectionStart":0},{"duration":217.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/b09d0d077992e4331b5f9ec0d3ec448c-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":167.70000004768372,"connectEnd":167.70000004768372,"connectStart":167.70000004768372,"domainLookupEnd":167.70000004768372,"domainLookupStart":167.70000004768372,"fetchStart":167.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":167.70000004768372,"responseEnd":385.59999990463257,"responseStart":385.59999990463257,"secureConnectionStart":167.70000004768372},{"duration":374.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/b47ab3df14096803b180217eb8482517-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":167.79999995231628,"connectEnd":167.79999995231628,"connectStart":167.79999995231628,"domainLookupEnd":167.79999995231628,"domainLookupStart":167.79999995231628,"fetchStart":167.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":167.79999995231628,"responseEnd":542.4000000953674,"responseStart":542.4000000953674,"secureConnectionStart":167.79999995231628},{"duration":378,"initiatorType":"script","name":"https://jira.mariadb.org/s/6c569cbf8087ab04e40d0bef98627457-CDN/lu2bsh/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":168,"connectEnd":168,"connectStart":168,"domainLookupEnd":168,"domainLookupStart":168,"fetchStart":168,"redirectEnd":0,"redirectStart":0,"requestStart":168,"responseEnd":546,"responseStart":546,"secureConnectionStart":168},{"duration":378.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":168,"connectEnd":168,"connectStart":168,"domainLookupEnd":168,"domainLookupStart":168,"fetchStart":168,"redirectEnd":0,"redirectStart":0,"requestStart":168,"responseEnd":546.5999999046326,"responseStart":546.5999999046326,"secureConnectionStart":168},{"duration":378.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":168.09999990463257,"connectEnd":168.09999990463257,"connectStart":168.09999990463257,"domainLookupEnd":168.09999990463257,"domainLookupStart":168.09999990463257,"fetchStart":168.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":168.09999990463257,"responseEnd":547,"responseStart":547,"secureConnectionStart":168.09999990463257},{"duration":379.2999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bsh/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":168.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":168.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":547.5,"responseStart":0,"secureConnectionStart":0},{"duration":379.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":168.20000004768372,"connectEnd":168.20000004768372,"connectStart":168.20000004768372,"domainLookupEnd":168.20000004768372,"domainLookupStart":168.20000004768372,"fetchStart":168.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":168.20000004768372,"responseEnd":547.5,"responseStart":547.5,"secureConnectionStart":168.20000004768372},{"duration":379.60000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bsh/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":168.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":168.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":547.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":379.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/81b5d7c27af3ebc078cc4a36383678ba-CDN/lu2bsh/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":168.59999990463257,"connectEnd":168.59999990463257,"connectStart":168.59999990463257,"domainLookupEnd":168.59999990463257,"domainLookupStart":168.59999990463257,"fetchStart":168.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":168.59999990463257,"responseEnd":548.0999999046326,"responseStart":548.0999999046326,"secureConnectionStart":168.59999990463257},{"duration":522.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":169,"connectEnd":169,"connectStart":169,"domainLookupEnd":169,"domainLookupStart":169,"fetchStart":169,"redirectEnd":0,"redirectStart":0,"requestStart":169,"responseEnd":691.5,"responseStart":691.5,"secureConnectionStart":169},{"duration":882.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":174,"connectEnd":174,"connectStart":174,"domainLookupEnd":174,"domainLookupStart":174,"fetchStart":174,"redirectEnd":0,"redirectStart":0,"requestStart":174,"responseEnd":1056.7000000476837,"responseStart":1056.7000000476837,"secureConnectionStart":174},{"duration":142.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":532.5,"connectEnd":532.5,"connectStart":532.5,"domainLookupEnd":532.5,"domainLookupStart":532.5,"fetchStart":532.5,"redirectEnd":0,"redirectStart":0,"requestStart":532.5,"responseEnd":675.4000000953674,"responseStart":675.4000000953674,"secureConnectionStart":532.5},{"duration":278.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bsh/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","startTime":821.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":821.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1100.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":280,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2bsh/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":821.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":821.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1101.5999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":37,"responseStart":162,"responseEnd":167,"domLoading":165,"domInteractive":1087,"domContentLoadedEventStart":1087,"domContentLoadedEventEnd":1131,"domComplete":1750,"loadEventStart":1750,"loadEventEnd":1750,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1058.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1059.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1059.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1062.9000000953674},{"name":"activityTabFullyLoaded","time":1145.5999999046326}],"measures":[],"correlationId":"8863d5c160a25c","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":75,"dbReadsTimeInMs":9,"dbConnsTimeInMs":16,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Additionally: this doesn't seem to be specific to a particular storage engine.