After fix for MDEV-4410 , EXPLAIN still shows weird #rows:
create table t2(a int);
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (key1 int, col1 int, key(key1));
insert into t1
select A.a + 10 * B.a + 100 * C.a, 1234 from t2 A, t2 B, t2 C;
mysql> explain update t1 set key1=key1+1 where key1 between 10 and 110 order by key1 limit 2;
+------+-------------+-------+-------+---------------+------+---------+------+------+---------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+-------+-------+---------------+------+---------+------+------+---------------------------+
| 1 | SIMPLE | t1 | range | key1 | key1 | 5 | NULL | 101 | Using where; Using buffer |
+------+-------------+-------+-------+---------------+------+---------+------+------+---------------------------+
The output shows as if 100 rows were to be scanned. Actually, we expect to scan LIMIT / where_selectivity rows (here where_selectivity is selectivity of WHERE for results of the range scan).
If we assume where_selectivity=1 (which is often done across the optimizer when no other sources of info are present), then we expect to scan LIMIT rows.
Sergei Golubchik
made changes -
2014-03-17 16:14
Fix Version/s
10.0.11
[ 15200
]
Sergei Golubchik
made changes -
2014-05-10 23:12
Fix Version/s
10.0.12
[ 15201
]
Fix Version/s
10.0.11
[ 15200
]
Sergei Petrunia
made changes -
2014-06-03 23:26
Resolution
Fixed
[ 1
]
Status
Open
[ 1
]
Closed
[ 6
]
Sergei Golubchik
made changes -
2014-06-13 15:06
Workflow
defaullt
[ 36908
]
MariaDB v2
[ 43824
]
Sergei Golubchik
made changes -
2021-12-06 21:39
Workflow
MariaDB v3
[ 63020
]
MariaDB v4
[ 147649
]
{"report":{"fcp":1296.4000000953674,"ttfb":340,"pageVisibility":"visible","entityId":33108,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5c9678d2-1cee-40b9-8564-60bc9768ad35","navigationType":0,"readyForUser":1381.2999997138977,"redirectCount":0,"resourceLoadedEnd":1640,"resourceLoadedStart":345.19999980926514,"resourceTiming":[{"duration":441.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":345.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":345.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":786.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":441.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":345.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":345.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":786.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":450.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":345.59999990463257,"connectEnd":345.59999990463257,"connectStart":345.59999990463257,"domainLookupEnd":345.59999990463257,"domainLookupStart":345.59999990463257,"fetchStart":345.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":345.59999990463257,"responseEnd":796.0999999046326,"responseStart":796.0999999046326,"secureConnectionStart":345.59999990463257},{"duration":521.6000003814697,"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":345.7999997138977,"connectEnd":345.7999997138977,"connectStart":345.7999997138977,"domainLookupEnd":345.7999997138977,"domainLookupStart":345.7999997138977,"fetchStart":345.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":345.7999997138977,"responseEnd":867.4000000953674,"responseStart":867.4000000953674,"secureConnectionStart":345.7999997138977},{"duration":525.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":346,"connectEnd":346,"connectStart":346,"domainLookupEnd":346,"domainLookupStart":346,"fetchStart":346,"redirectEnd":0,"redirectStart":0,"requestStart":346,"responseEnd":871.5,"responseStart":871.5,"secureConnectionStart":346},{"duration":525.8000001907349,"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":346.2999997138977,"connectEnd":346.2999997138977,"connectStart":346.2999997138977,"domainLookupEnd":346.2999997138977,"domainLookupStart":346.2999997138977,"fetchStart":346.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":346.2999997138977,"responseEnd":872.0999999046326,"responseStart":872.0999999046326,"secureConnectionStart":346.2999997138977},{"duration":525.9000000953674,"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":346.5,"connectEnd":346.5,"connectStart":346.5,"domainLookupEnd":346.5,"domainLookupStart":346.5,"fetchStart":346.5,"redirectEnd":0,"redirectStart":0,"requestStart":346.5,"responseEnd":872.4000000953674,"responseStart":872.4000000953674,"secureConnectionStart":346.5},{"duration":597.4000000953674,"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":346.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":346.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":944,"responseStart":0,"secureConnectionStart":0},{"duration":526.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":346.7999997138977,"connectEnd":346.7999997138977,"connectStart":346.7999997138977,"domainLookupEnd":346.7999997138977,"domainLookupStart":346.7999997138977,"fetchStart":346.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":346.7999997138977,"responseEnd":872.9000000953674,"responseStart":872.9000000953674,"secureConnectionStart":346.7999997138977},{"duration":597.2999997138977,"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":346.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":346.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":944.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":526.4000000953674,"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":347.09999990463257,"connectEnd":347.09999990463257,"connectStart":347.09999990463257,"domainLookupEnd":347.09999990463257,"domainLookupStart":347.09999990463257,"fetchStart":347.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":347.09999990463257,"responseEnd":873.5,"responseStart":873.4000000953674,"secureConnectionStart":347.09999990463257},{"duration":791.3999996185303,"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":352.40000009536743,"connectEnd":352.40000009536743,"connectStart":352.40000009536743,"domainLookupEnd":352.40000009536743,"domainLookupStart":352.40000009536743,"fetchStart":352.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":352.40000009536743,"responseEnd":1143.7999997138977,"responseStart":1143.7999997138977,"secureConnectionStart":352.40000009536743},{"duration":1287.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":352.5,"connectEnd":352.5,"connectStart":352.5,"domainLookupEnd":352.5,"domainLookupStart":352.5,"fetchStart":352.5,"redirectEnd":0,"redirectStart":0,"requestStart":352.5,"responseEnd":1640,"responseStart":1640,"secureConnectionStart":352.5},{"duration":187.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":956.5999999046326,"connectEnd":956.5999999046326,"connectStart":956.5999999046326,"domainLookupEnd":956.5999999046326,"domainLookupStart":956.5999999046326,"fetchStart":956.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":956.5999999046326,"responseEnd":1144.5,"responseStart":1144.5,"secureConnectionStart":956.5999999046326},{"duration":417.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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&whisper-enabled=true","startTime":1298.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1298.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1716.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":407.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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&whisper-enabled=true","startTime":1300,"connectEnd":1300,"connectStart":1300,"domainLookupEnd":1300,"domainLookupStart":1300,"fetchStart":1300,"redirectEnd":0,"redirectStart":0,"requestStart":1300,"responseEnd":1707.1999998092651,"responseStart":1707.0999999046326,"secureConnectionStart":1300},{"duration":413.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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&whisper-enabled=true","startTime":1300.5,"connectEnd":1300.5,"connectStart":1300.5,"domainLookupEnd":1300.5,"domainLookupStart":1300.5,"fetchStart":1300.5,"redirectEnd":0,"redirectStart":0,"requestStart":1300.5,"responseEnd":1714.1999998092651,"responseStart":1714.1999998092651,"secureConnectionStart":1300.5}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":167,"responseStart":340,"responseEnd":350,"domLoading":344,"domInteractive":1674,"domContentLoadedEventStart":1674,"domContentLoadedEventEnd":1716,"domComplete":2631,"loadEventStart":2631,"loadEventEnd":2631,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1641.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1642.7999997138977},{"name":"bigPipe.activity-panel-pipe-id.start","time":1642.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1645.1999998092651},{"name":"activityTabFullyLoaded","time":1731.0999999046326}],"measures":[],"correlationId":"c42738992e2569","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":18,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}