Hi,
I've just tested the CONNECT engine on a "big" table (24GB) on my local server :
CREATE TABLE `url_list_connect` (
|
`id` int(10) unsigned NOT NULL,
|
`url` varchar(2048) NOT NULL DEFAULT '',
|
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`id_license_domain` int(10) unsigned NOT NULL DEFAULT '0',
|
`id_license` int(10) unsigned NOT NULL DEFAULT '0',
|
`dom` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
`loadtime` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
`gen` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
`script` varchar(2048) NOT NULL DEFAULT '',
|
`database_time` mediumint(8) unsigned NOT NULL DEFAULT '0'
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=MYSQL `dbname`=test `tabname`=url_list `option_list`='user=root,host=localhost,password=xxxx'
|
The original table is a tokudb table with a tokudb_cache_size of 12Go
(I can see the same behaviour with an InnoDB table).
Then I've tested the following :
SELECT * FROM url_list_connect LIMIT 10;
This query seems to execute a full scan of the table and load the whole table in memory, before returning the 10 first results.
Hence the mysql server finally crashes because out of memory. (even with a small innodb_buffer_pool_size / tokudb_cache_size / tmp_table_size).
I don't see any variable like in cassandra SE which allows to control the full scan behaviour :
"Full table scans are performed in a memory-efficient way. Cassandra SE performs a full table scan as a series of batches, each of which reads not more than cassandra_rnd_batch_size records."
To reproduce : create a table with a size > the total memory on the server, then select without a WHERE clause.
Thanks and regards,
Jocelyn Fournier
{"report":{"fcp":1276.7999997138977,"ttfb":450.3999996185303,"pageVisibility":"visible","entityId":35600,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"51d64be8-db05-4305-b4b6-f5d59550e821","navigationType":0,"readyForUser":1352.8999996185303,"redirectCount":0,"resourceLoadedEnd":1574.0999999046326,"resourceLoadedStart":455.3999996185303,"resourceTiming":[{"duration":352.2000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":455.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":455.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":807.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":352.19999980926514,"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":455.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":455.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":807.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":361.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":455.8999996185303,"connectEnd":455.8999996185303,"connectStart":455.8999996185303,"domainLookupEnd":455.8999996185303,"domainLookupStart":455.8999996185303,"fetchStart":455.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":455.8999996185303,"responseEnd":817.3999996185303,"responseStart":817.3999996185303,"secureConnectionStart":455.8999996185303},{"duration":405.69999980926514,"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":456.09999990463257,"connectEnd":456.09999990463257,"connectStart":456.09999990463257,"domainLookupEnd":456.09999990463257,"domainLookupStart":456.09999990463257,"fetchStart":456.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":456.09999990463257,"responseEnd":861.7999997138977,"responseStart":861.7999997138977,"secureConnectionStart":456.09999990463257},{"duration":409.5,"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":456.2999997138977,"connectEnd":456.2999997138977,"connectStart":456.2999997138977,"domainLookupEnd":456.2999997138977,"domainLookupStart":456.2999997138977,"fetchStart":456.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":456.2999997138977,"responseEnd":865.7999997138977,"responseStart":865.7999997138977,"secureConnectionStart":456.2999997138977},{"duration":409.7999997138977,"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":456.5,"connectEnd":456.5,"connectStart":456.5,"domainLookupEnd":456.5,"domainLookupStart":456.5,"fetchStart":456.5,"redirectEnd":0,"redirectStart":0,"requestStart":456.5,"responseEnd":866.2999997138977,"responseStart":866.2999997138977,"secureConnectionStart":456.5},{"duration":410,"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":456.69999980926514,"connectEnd":456.69999980926514,"connectStart":456.69999980926514,"domainLookupEnd":456.69999980926514,"domainLookupStart":456.69999980926514,"fetchStart":456.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":456.69999980926514,"responseEnd":866.6999998092651,"responseStart":866.6999998092651,"secureConnectionStart":456.69999980926514},{"duration":506.40000009536743,"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":456.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":456.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":963.2999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":410.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":457,"connectEnd":457,"connectStart":457,"domainLookupEnd":457,"domainLookupStart":457,"fetchStart":457,"redirectEnd":0,"redirectStart":0,"requestStart":457,"responseEnd":867.0999999046326,"responseStart":867.0999999046326,"secureConnectionStart":457},{"duration":506.40000009536743,"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":457.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":457.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":963.5,"responseStart":0,"secureConnectionStart":0},{"duration":410.40000009536743,"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":457.2999997138977,"connectEnd":457.2999997138977,"connectStart":457.2999997138977,"domainLookupEnd":457.2999997138977,"domainLookupStart":457.2999997138977,"fetchStart":457.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":457.2999997138977,"responseEnd":867.6999998092651,"responseStart":867.6999998092651,"secureConnectionStart":457.2999997138977},{"duration":1000,"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":462.5,"connectEnd":462.5,"connectStart":462.5,"domainLookupEnd":462.5,"domainLookupStart":462.5,"fetchStart":462.5,"redirectEnd":0,"redirectStart":0,"requestStart":462.5,"responseEnd":1462.5,"responseStart":1462.5,"secureConnectionStart":462.5},{"duration":1111.5,"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":462.59999990463257,"connectEnd":462.59999990463257,"connectStart":462.59999990463257,"domainLookupEnd":462.59999990463257,"domainLookupStart":462.59999990463257,"fetchStart":462.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":462.59999990463257,"responseEnd":1574.0999999046326,"responseStart":1574,"secureConnectionStart":462.59999990463257},{"duration":494.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":975.1999998092651,"connectEnd":975.1999998092651,"connectStart":975.1999998092651,"domainLookupEnd":975.1999998092651,"domainLookupStart":975.1999998092651,"fetchStart":975.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":975.1999998092651,"responseEnd":1469.2999997138977,"responseStart":1469.2999997138977,"secureConnectionStart":975.1999998092651},{"duration":304.59999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1270.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1270.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1575.1999998092651,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":301,"responseStart":451,"responseEnd":458,"domLoading":454,"domInteractive":1595,"domContentLoadedEventStart":1595,"domContentLoadedEventEnd":1638,"domComplete":2165,"loadEventStart":2165,"loadEventEnd":2167,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1577.7999997138977},{"name":"bigPipe.sidebar-id.end","time":1578.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1578.8999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":1581.2999997138977},{"name":"activityTabFullyLoaded","time":1643.0999999046326}],"measures":[],"correlationId":"25994983a27bc","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":92,"dbReadsTimeInMs":8,"dbConnsTimeInMs":15,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}