Execution of the recursive query below leads to one of the possible outcomes:
a) query execution seems to be endless (I waited no more than 20 minutes) while CPU, memory and disk usage is high (see attached screenshot)
...and sometimes the exectiuon leads to the crash of the server!!! The mysqld service was stopped and I had to start it up.
b) the following exception occurs almost immediatelly :
java.sql.SQLException: (conn:1608) (conn:1608) Out of memory (Needed 2327021592 bytes)
c) the following exception occurs after several seconds:
error code 1815, java.sql.SQLException: (conn:1626) (conn:1626) Internal error: Using too big key for internal temp tables
The query is:
with recursive query(ID, PARENT_ID, `TEXT`, DESCRIPTION) as (
select CD0T0.ID, CD0T0.PARENT_ID, CD0T0.TEXT, CD0T0.DESCRIPTION
FROM TEST CD0T0 where CD0T0.TEXT = 'vehicle' and CD0T0.PARENT_ID IS NULL
union all
select CD0T0.ID, CD0T0.PARENT_ID, CD0T0.TEXT, CD0T0.DESCRIPTION
from TEST CD0T0, query
where CD0T0.PARENT_ID = query.ID)
select *
from query
The column TEXT is varchar(100), the column DESCRIPTION is longtext.
The complete table defintion and data is an an attached file.
The problem does not occur when the DESCRIPTION column is ommittted from the query - it returns the 8 rows almost instantly.
The problem depends on the data somehow. Without the mass data (I had 22000+ records), the problem doesn't occur.
I thought it could be the same problem as MDEV-12556, but that one should be solved in 10.2.
{"report":{"fcp":1097,"ttfb":287.10000002384186,"pageVisibility":"visible","entityId":68951,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"cf162afc-53c5-4a5e-9679-d3d79c594452","navigationType":0,"readyForUser":1176.3000000715256,"redirectCount":0,"resourceLoadedEnd":1191.1000000238419,"resourceLoadedStart":292.7000000476837,"resourceTiming":[{"duration":278.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":292.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":292.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":571.3000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":278.5,"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":293.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":293.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":571.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":337.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":293.5,"connectEnd":293.5,"connectStart":293.5,"domainLookupEnd":293.5,"domainLookupStart":293.5,"fetchStart":293.5,"redirectEnd":0,"redirectStart":0,"requestStart":293.5,"responseEnd":631.3999999761581,"responseStart":631.3999999761581,"secureConnectionStart":293.5},{"duration":432.3000000715256,"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":293.5,"connectEnd":293.5,"connectStart":293.5,"domainLookupEnd":293.5,"domainLookupStart":293.5,"fetchStart":293.5,"redirectEnd":0,"redirectStart":0,"requestStart":293.5,"responseEnd":725.8000000715256,"responseStart":725.8000000715256,"secureConnectionStart":293.5},{"duration":436.2999999523163,"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":293.7000000476837,"connectEnd":293.7000000476837,"connectStart":293.7000000476837,"domainLookupEnd":293.7000000476837,"domainLookupStart":293.7000000476837,"fetchStart":293.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":293.7000000476837,"responseEnd":730,"responseStart":730,"secureConnectionStart":293.7000000476837},{"duration":436.6999999284744,"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":293.8000000715256,"connectEnd":293.8000000715256,"connectStart":293.8000000715256,"domainLookupEnd":293.8000000715256,"domainLookupStart":293.8000000715256,"fetchStart":293.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":293.8000000715256,"responseEnd":730.5,"responseStart":730.5,"secureConnectionStart":293.8000000715256},{"duration":437,"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":293.8000000715256,"connectEnd":293.8000000715256,"connectStart":293.8000000715256,"domainLookupEnd":293.8000000715256,"domainLookupStart":293.8000000715256,"fetchStart":293.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":293.8000000715256,"responseEnd":730.8000000715256,"responseStart":730.7000000476837,"secureConnectionStart":293.8000000715256},{"duration":437.40000009536743,"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":293.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":293.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":731.3000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":437.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":294.10000002384186,"connectEnd":294.10000002384186,"connectStart":294.10000002384186,"domainLookupEnd":294.10000002384186,"domainLookupStart":294.10000002384186,"fetchStart":294.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":294.10000002384186,"responseEnd":731.2000000476837,"responseStart":731.2000000476837,"secureConnectionStart":294.10000002384186},{"duration":437.5,"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":294.3000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":294.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":731.8000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":437.59999990463257,"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":294.3000000715256,"connectEnd":294.3000000715256,"connectStart":294.3000000715256,"domainLookupEnd":294.3000000715256,"domainLookupStart":294.3000000715256,"fetchStart":294.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":294.3000000715256,"responseEnd":731.8999999761581,"responseStart":731.8999999761581,"secureConnectionStart":294.3000000715256},{"duration":649.2999999523163,"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":295.10000002384186,"connectEnd":295.10000002384186,"connectStart":295.10000002384186,"domainLookupEnd":295.10000002384186,"domainLookupStart":295.10000002384186,"fetchStart":295.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":295.10000002384186,"responseEnd":944.3999999761581,"responseStart":944.3999999761581,"secureConnectionStart":295.10000002384186},{"duration":733.7000000476837,"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":295.10000002384186,"connectEnd":295.10000002384186,"connectStart":295.10000002384186,"domainLookupEnd":295.10000002384186,"domainLookupStart":295.10000002384186,"fetchStart":295.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":295.10000002384186,"responseEnd":1028.8000000715256,"responseStart":1028.8000000715256,"secureConnectionStart":295.10000002384186},{"duration":159.80000007152557,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":785,"connectEnd":785,"connectStart":785,"domainLookupEnd":785,"domainLookupStart":785,"fetchStart":785,"redirectEnd":0,"redirectStart":0,"requestStart":785,"responseEnd":944.8000000715256,"responseStart":944.8000000715256,"secureConnectionStart":785},{"duration":35,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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":997.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":997.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1032.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":190,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":998.1000000238419,"connectEnd":998.1000000238419,"connectStart":998.1000000238419,"domainLookupEnd":998.1000000238419,"domainLookupStart":998.1000000238419,"fetchStart":998.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":998.1000000238419,"responseEnd":1188.1000000238419,"responseStart":1188.1000000238419,"secureConnectionStart":998.1000000238419},{"duration":192.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/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.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":998.5,"connectEnd":998.5,"connectStart":998.5,"domainLookupEnd":998.5,"domainLookupStart":998.5,"fetchStart":998.5,"redirectEnd":0,"redirectStart":0,"requestStart":998.5,"responseEnd":1191.1000000238419,"responseStart":1191.1000000238419,"secureConnectionStart":998.5},{"duration":177.69999992847443,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1088.8000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1088.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1266.5,"responseStart":0,"secureConnectionStart":0},{"duration":156.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1111.8999999761581,"connectEnd":1111.8999999761581,"connectStart":1111.8999999761581,"domainLookupEnd":1111.8999999761581,"domainLookupStart":1111.8999999761581,"fetchStart":1111.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1111.8999999761581,"responseEnd":1268.3000000715256,"responseStart":1268.3000000715256,"secureConnectionStart":1111.8999999761581}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":122,"responseStart":287,"responseEnd":290,"domLoading":290,"domInteractive":1243,"domContentLoadedEventStart":1243,"domContentLoadedEventEnd":1295,"domComplete":1488,"loadEventStart":1488,"loadEventEnd":1488,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1211.8000000715256},{"name":"bigPipe.sidebar-id.end","time":1212.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.start","time":1212.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1214.2000000476837},{"name":"activityTabFullyLoaded","time":1312.3999999761581}],"measures":[],"correlationId":"bb9e95d9c7dac3","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Note to
MDEV-12556:When I created the test table and executed both queries (with or without the c2 column), both executed in a few miliseconds. This means that that bug has been shomehow fixed.
However something in my table structure and data still leads to a massive perfomance problem.