Type:
Bug
Priority:
Major
Resolution:
Won't Fix
Affects Version/s:
None
Fix Version/s:
None
Component/s:
None
The following query
SELECT * FROM v, t2
WHERE ( c, c ) NOT IN ( SELECT c, d FROM t2, t3 )
LIMIT_ROWS_EXAMINED 30000;
where v is a view
CREATE VIEW v AS
SELECT alias1.*
FROM t1 AS alias1 LEFT OUTER JOIN t1 AS alias2
ON alias1.a = alias2.b;
finishes with the warning "Warning 1930 Query execution was interrupted. The query examined at least 150491 rows" (the number is somewhat greater with InnoDB). It is confirmed by the status variables:
Handler_read_key 1
Handler_read_rnd 143742
Handler_read_rnd_next 3461
Handler_tmp_write 3289
EXPLAIN:
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY alias1 system NULL NULL NULL NULL 1 100.00
1 PRIMARY alias2 system NULL NULL NULL NULL 1 100.00
1 PRIMARY t2 ALL NULL NULL NULL NULL 274 100.00 Using where
2 MATERIALIZED t3 ALL NULL NULL NULL NULL 12 100.00
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 274 100.00 Using join buffer (flat, BNL join)
Warnings:
Note 1003 select 'USAEnglish' AS `a`,86 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` `alias1` left join `test`.`t1` `alias2` on(('USAEnglish' = NULL)) join `test`.`t2` where (not(<expr_cache><`test`.`t2`.`c`>(<in_optimizer>((`test`.`t2`.`c`,`test`.`t2`.`c`),(`test`.`t2`.`c`,`test`.`t2`.`c`) in ( <materialize> (select `test`.`t2`.`c`,`test`.`t3`.`d` from `test`.`t2` join `test`.`t3` ), <primary_index_lookup>(`test`.`t2`.`c` in <temporary table> on distinct_key where ((`test`.`t2`.`c` = `<subquery2>`.`c`) and (`test`.`t2`.`c` = `<subquery2>`.`d`))))))))
Optimizer switch (default):
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
bzr version-info
revision-id: timour@askmonty.org-20120213145248-tlvsd794o83odf2r
date: 2012-02-13 16:52:48 +0200
build-date: 2012-02-15 05:49:21 +0400
revno: 3417
Test case is attached.
relates to
MDEV-28
LIMIT ROWS EXAMINED clause to limit the number of rows examined during SELECT processing
Closed
{"report":{"fcp":752,"ttfb":160.5,"pageVisibility":"visible","entityId":10724,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"44e74555-a450-4cd7-9edf-f2b2e22acee6","navigationType":0,"readyForUser":827.3999999985099,"redirectCount":0,"resourceLoadedEnd":1112.6000000014901,"resourceLoadedStart":166.20000000298023,"resourceTiming":[{"duration":120.29999999701977,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":166.20000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":166.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":286.5,"responseStart":0,"secureConnectionStart":0},{"duration":120.39999999850988,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":166.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":166.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":286.8999999985099,"responseStart":0,"secureConnectionStart":0},{"duration":129,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":166.60000000149012,"connectEnd":166.60000000149012,"connectStart":166.60000000149012,"domainLookupEnd":166.60000000149012,"domainLookupStart":166.60000000149012,"fetchStart":166.60000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":166.60000000149012,"responseEnd":295.6000000014901,"responseStart":295.6000000014901,"secureConnectionStart":166.60000000149012},{"duration":171.39999999850988,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":166.80000000447035,"connectEnd":166.80000000447035,"connectStart":166.80000000447035,"domainLookupEnd":166.80000000447035,"domainLookupStart":166.80000000447035,"fetchStart":166.80000000447035,"redirectEnd":0,"redirectStart":0,"requestStart":166.80000000447035,"responseEnd":338.20000000298023,"responseStart":338.20000000298023,"secureConnectionStart":166.80000000447035},{"duration":175.10000000149012,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":167.10000000149012,"connectEnd":167.10000000149012,"connectStart":167.10000000149012,"domainLookupEnd":167.10000000149012,"domainLookupStart":167.10000000149012,"fetchStart":167.10000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":167.10000000149012,"responseEnd":342.20000000298023,"responseStart":342.20000000298023,"secureConnectionStart":167.10000000149012},{"duration":175.39999999850988,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":167.30000000447035,"connectEnd":167.30000000447035,"connectStart":167.30000000447035,"domainLookupEnd":167.30000000447035,"domainLookupStart":167.30000000447035,"fetchStart":167.30000000447035,"redirectEnd":0,"redirectStart":0,"requestStart":167.30000000447035,"responseEnd":342.70000000298023,"responseStart":342.70000000298023,"secureConnectionStart":167.30000000447035},{"duration":175.60000000149012,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":167.5,"connectEnd":167.5,"connectStart":167.5,"domainLookupEnd":167.5,"domainLookupStart":167.5,"fetchStart":167.5,"redirectEnd":0,"redirectStart":0,"requestStart":167.5,"responseEnd":343.1000000014901,"responseStart":343.1000000014901,"secureConnectionStart":167.5},{"duration":271.79999999701977,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":167.70000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":167.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":439.5,"responseStart":0,"secureConnectionStart":0},{"duration":175.60000000149012,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":167.89999999850988,"connectEnd":167.89999999850988,"connectStart":167.89999999850988,"domainLookupEnd":167.89999999850988,"domainLookupStart":167.89999999850988,"fetchStart":167.89999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":167.89999999850988,"responseEnd":343.5,"responseStart":343.3999999985099,"secureConnectionStart":167.89999999850988},{"duration":271.70000000298023,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":168,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":439.70000000298023,"responseStart":0,"secureConnectionStart":0},{"duration":175.89999999850988,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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.20000000298023,"connectEnd":168.20000000298023,"connectStart":168.20000000298023,"domainLookupEnd":168.20000000298023,"domainLookupStart":168.20000000298023,"fetchStart":168.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":168.20000000298023,"responseEnd":344.1000000014901,"responseStart":344.1000000014901,"secureConnectionStart":168.20000000298023},{"duration":942.3999999985099,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":169.10000000149012,"connectEnd":169.10000000149012,"connectStart":169.10000000149012,"domainLookupEnd":169.10000000149012,"domainLookupStart":169.10000000149012,"fetchStart":169.10000000149012,"redirectEnd":0,"redirectStart":0,"requestStart":169.10000000149012,"responseEnd":1111.5,"responseStart":1111.5,"secureConnectionStart":169.10000000149012},{"duration":939.2000000029802,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":173.39999999850988,"connectEnd":173.39999999850988,"connectStart":173.39999999850988,"domainLookupEnd":173.39999999850988,"domainLookupStart":173.39999999850988,"fetchStart":173.39999999850988,"redirectEnd":0,"redirectStart":0,"requestStart":173.39999999850988,"responseEnd":1112.6000000014901,"responseStart":1112.6000000014901,"secureConnectionStart":173.39999999850988},{"duration":277.59999999403954,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":467.30000000447035,"connectEnd":467.30000000447035,"connectStart":467.30000000447035,"domainLookupEnd":467.30000000447035,"domainLookupStart":467.30000000447035,"fetchStart":467.30000000447035,"redirectEnd":0,"redirectStart":0,"requestStart":467.30000000447035,"responseEnd":744.8999999985099,"responseStart":744.8999999985099,"secureConnectionStart":467.30000000447035}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":160,"responseEnd":166,"domLoading":163,"domInteractive":1133,"domContentLoadedEventStart":1133,"domContentLoadedEventEnd":1173,"domComplete":1729,"loadEventStart":1729,"loadEventEnd":1731,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1118},{"name":"bigPipe.sidebar-id.end","time":1118.8000000044703},{"name":"bigPipe.activity-panel-pipe-id.start","time":1119},{"name":"bigPipe.activity-panel-pipe-id.end","time":1121.3999999985099},{"name":"activityTabFullyLoaded","time":1181.3999999985099}],"measures":[],"correlationId":"e4f68f664678ee","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":96,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}