|
|
|
@@ -22,7 +22,7 @@ select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2;
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 4;
|
|
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
@@ -32,7 +32,7 @@ select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 4;
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 5 rows, which exceeds LIMIT ROWS EXAMINED (4). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 4. The query result may be incomplete
|
|
|
|
|
Blocked nested loops join, empty result set because of blocking
|
|
|
|
|
set @@join_cache_level=1;
|
|
|
|
|
explain
|
|
|
|
@@ -44,7 +44,7 @@ select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
@@ -55,7 +55,7 @@ c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
cc cc
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
set @@join_cache_level=6;
|
|
|
|
|
explain
|
|
|
|
|
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 3;
|
|
|
|
@@ -65,7 +65,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 3;
|
|
|
|
|
c1 c2
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 4 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 3. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
@@ -76,7 +76,7 @@ c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
cc cc
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
Mix LIMIT ROWS EXAMINED with LIMIT
|
|
|
|
|
set @@join_cache_level=0;
|
|
|
|
|
explain
|
|
|
|
@@ -125,7 +125,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select * from t0, t1 where c0 = 'bb' and c1 > c0 LIMIT ROWS EXAMINED 0;
|
|
|
|
|
c0 c1
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 2 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete
|
|
|
|
|
set @@join_cache_level = @save_join_cache_level;
|
|
|
|
|
drop table t0;
|
|
|
|
|
=========================================================================
|
|
|
|
@@ -139,7 +139,7 @@ execute st1 using @l;
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
|
|
|
|
|
deallocate prepare st1;
|
|
|
|
|
User variable (not supported for LIMIT in MariaDB 5.3/MySQL 5.1)
|
|
|
|
|
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED @l;
|
|
|
|
@@ -153,7 +153,7 @@ call test_limit_rows(3);
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 4 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 3. The query result may be incomplete
|
|
|
|
|
drop procedure test_limit_rows;
|
|
|
|
|
set @@join_cache_level = @save_join_cache_level;
|
|
|
|
|
=========================================================================
|
|
|
|
@@ -165,14 +165,14 @@ UNION
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
(select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0)
|
|
|
|
|
UNION
|
|
|
|
|
(select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 6);
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0
|
|
|
|
|
UNION
|
|
|
|
|
select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 6;
|
|
|
|
@@ -185,7 +185,7 @@ LIMIT ROWS EXAMINED 6;
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
(select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0)
|
|
|
|
|
UNION
|
|
|
|
|
(select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 0)
|
|
|
|
@@ -193,7 +193,7 @@ LIMIT 1 ROWS EXAMINED 6;
|
|
|
|
|
c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
(select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0)
|
|
|
|
|
UNION
|
|
|
|
|
(select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 0)
|
|
|
|
@@ -202,7 +202,7 @@ c1 c2
|
|
|
|
|
bb bb
|
|
|
|
|
cc cc
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (10). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 10. The query result may be incomplete
|
|
|
|
|
=========================================================================
|
|
|
|
|
Subqueries (with several LIMIT ROWS EXAMINED clauses)
|
|
|
|
|
=========================================================================
|
|
|
|
@@ -219,7 +219,7 @@ where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 11);
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1
|
|
|
|
|
where c1 IN (select * from t2 where c2 > ' ')
|
|
|
|
@@ -234,7 +234,7 @@ LIMIT ROWS EXAMINED 11;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1
|
|
|
|
|
where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0)
|
|
|
|
@@ -249,7 +249,7 @@ LIMIT ROWS EXAMINED 11;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1i
|
|
|
|
|
where c1 IN (select * from t2i where c2 > ' ')
|
|
|
|
@@ -264,7 +264,7 @@ c1
|
|
|
|
|
bb
|
|
|
|
|
cc
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
Subqueries with IN-TO-EXISTS
|
|
|
|
|
set @@optimizer_switch='semijoin=off,in_to_exists=on,materialization=off';
|
|
|
|
|
explain
|
|
|
|
@@ -278,7 +278,7 @@ where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 4);
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 5 rows, which exceeds LIMIT ROWS EXAMINED (4). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 4. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1
|
|
|
|
|
where c1 IN (select * from t2 where c2 > ' ')
|
|
|
|
@@ -292,7 +292,7 @@ LIMIT ROWS EXAMINED 4;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 5 rows, which exceeds LIMIT ROWS EXAMINED (4). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 4. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1
|
|
|
|
|
where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0)
|
|
|
|
@@ -306,7 +306,7 @@ LIMIT ROWS EXAMINED 4;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 5 rows, which exceeds LIMIT ROWS EXAMINED (4). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 4. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1i
|
|
|
|
|
where c1 IN (select * from t2i where c2 > ' ')
|
|
|
|
@@ -320,7 +320,7 @@ LIMIT ROWS EXAMINED 9;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (9). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 9. The query result may be incomplete
|
|
|
|
|
Same as above, without subquery cache
|
|
|
|
|
set @@optimizer_switch='subquery_cache=off';
|
|
|
|
|
select * from t1
|
|
|
|
@@ -328,28 +328,28 @@ where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 2);
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
|
|
|
|
|
select * from t1
|
|
|
|
|
where c1 IN (select * from t2 where c2 > ' ')
|
|
|
|
|
LIMIT ROWS EXAMINED 2;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
|
|
|
|
|
select * from t1
|
|
|
|
|
where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0)
|
|
|
|
|
LIMIT ROWS EXAMINED 2;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
|
|
|
|
|
select * from t1i
|
|
|
|
|
where c1 IN (select * from t2i where c2 > ' ')
|
|
|
|
|
LIMIT ROWS EXAMINED 5;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete
|
|
|
|
|
Subqueries with materialization
|
|
|
|
|
set @@optimizer_switch='semijoin=off,in_to_exists=off,materialization=on,subquery_cache=on';
|
|
|
|
|
explain
|
|
|
|
@@ -363,7 +363,7 @@ where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 13);
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 14 rows, which exceeds LIMIT ROWS EXAMINED (13). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 13. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1
|
|
|
|
|
where c1 IN (select * from t2 where c2 > ' ') LIMIT ROWS EXAMINED 13;
|
|
|
|
@@ -375,7 +375,7 @@ where c1 IN (select * from t2 where c2 > ' ') LIMIT ROWS EXAMINED 13;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 14 rows, which exceeds LIMIT ROWS EXAMINED (13). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 13. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1
|
|
|
|
|
where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0)
|
|
|
|
@@ -389,7 +389,7 @@ LIMIT ROWS EXAMINED 13;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 14 rows, which exceeds LIMIT ROWS EXAMINED (13). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 13. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select * from t1i
|
|
|
|
|
where c1 IN (select * from t2i where c2 > ' ') LIMIT ROWS EXAMINED 17;
|
|
|
|
@@ -401,7 +401,7 @@ where c1 IN (select * from t2i where c2 > ' ') LIMIT ROWS EXAMINED 17;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 18 rows, which exceeds LIMIT ROWS EXAMINED (17). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 17. The query result may be incomplete
|
|
|
|
|
set @@optimizer_switch='default';
|
|
|
|
|
=========================================================================
|
|
|
|
|
Views and derived tables
|
|
|
|
@@ -422,18 +422,18 @@ bb
|
|
|
|
|
cc
|
|
|
|
|
dd
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 18 rows, which exceeds LIMIT ROWS EXAMINED (17). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 17. The query result may be incomplete
|
|
|
|
|
select * from v1 LIMIT ROWS EXAMINED 16;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
cc
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 17 rows, which exceeds LIMIT ROWS EXAMINED (16). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 16. The query result may be incomplete
|
|
|
|
|
select * from v1 LIMIT ROWS EXAMINED 11;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete
|
|
|
|
|
drop view v1;
|
|
|
|
|
explain
|
|
|
|
|
select *
|
|
|
|
@@ -451,7 +451,7 @@ LIMIT ROWS EXAMINED 11;
|
|
|
|
|
c1
|
|
|
|
|
bb
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete
|
|
|
|
|
=========================================================================
|
|
|
|
|
Aggregation
|
|
|
|
|
=========================================================================
|
|
|
|
@@ -474,16 +474,16 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select c1, sum(c2) from t3 group by c1 LIMIT ROWS EXAMINED 0;
|
|
|
|
|
c1 sum(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete
|
|
|
|
|
select c1, sum(c2) from t3 group by c1 LIMIT ROWS EXAMINED 1;
|
|
|
|
|
c1 sum(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (1). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 1. The query result may be incomplete
|
|
|
|
|
select c1, sum(c2) from t3 group by c1 LIMIT ROWS EXAMINED 20;
|
|
|
|
|
c1 sum(c2)
|
|
|
|
|
aa 3
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 21 rows, which exceeds LIMIT ROWS EXAMINED (20). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 20. The query result may be incomplete
|
|
|
|
|
select c1, sum(c2) from t3 group by c1 LIMIT ROWS EXAMINED 21;
|
|
|
|
|
c1 sum(c2)
|
|
|
|
|
aa 3
|
|
|
|
@@ -501,16 +501,16 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select c1, sum(c2) from t3i group by c1 LIMIT ROWS EXAMINED 0;
|
|
|
|
|
c1 sum(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete
|
|
|
|
|
select c1, sum(c2) from t3i group by c1 LIMIT ROWS EXAMINED 1;
|
|
|
|
|
c1 sum(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (1). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 1. The query result may be incomplete
|
|
|
|
|
select c1, sum(c2) from t3i group by c1 LIMIT ROWS EXAMINED 20;
|
|
|
|
|
c1 sum(c2)
|
|
|
|
|
aa 3
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 21 rows, which exceeds LIMIT ROWS EXAMINED (20). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 20. The query result may be incomplete
|
|
|
|
|
select c1, sum(c2) from t3i group by c1 LIMIT ROWS EXAMINED 21;
|
|
|
|
|
c1 sum(c2)
|
|
|
|
|
aa 3
|
|
|
|
@@ -523,14 +523,14 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select min(c2) from t3 LIMIT ROWS EXAMINED 5;
|
|
|
|
|
min(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete
|
|
|
|
|
select max(c2) from t3 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
max(c2)
|
|
|
|
|
5
|
|
|
|
|
select max(c2) from t3 LIMIT ROWS EXAMINED 0;
|
|
|
|
|
max(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select max(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 5;
|
|
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
@@ -538,14 +538,14 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select max(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 5;
|
|
|
|
|
max(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete
|
|
|
|
|
select max(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
max(c2)
|
|
|
|
|
NULL
|
|
|
|
|
select max(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 0;
|
|
|
|
|
max(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select count(c2) from t3 LIMIT ROWS EXAMINED 5;
|
|
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
@@ -553,14 +553,14 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select count(c2) from t3 LIMIT ROWS EXAMINED 5;
|
|
|
|
|
count(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete
|
|
|
|
|
select count(c2) from t3 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
count(c2)
|
|
|
|
|
5
|
|
|
|
|
select count(c2) from t3 LIMIT ROWS EXAMINED 0;
|
|
|
|
|
count(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select count(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 5;
|
|
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
@@ -568,7 +568,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select count(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 5;
|
|
|
|
|
count(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete
|
|
|
|
|
select count(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
count(c2)
|
|
|
|
|
0
|
|
|
|
@@ -579,7 +579,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
|
select sum(c2) from t3 LIMIT ROWS EXAMINED 5;
|
|
|
|
|
sum(c2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete
|
|
|
|
|
select sum(c2) from t3 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
sum(c2)
|
|
|
|
|
15
|
|
|
|
@@ -618,7 +618,7 @@ c1 c2
|
|
|
|
|
aa 1
|
|
|
|
|
aa 2
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
|
|
|
|
|
explain
|
|
|
|
|
select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2;
|
|
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
@@ -634,14 +634,14 @@ CREATE TABLE t4 (a int);
|
|
|
|
|
INSERT INTO t4 values (1), (2);
|
|
|
|
|
INSERT IGNORE INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 0;
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete
|
|
|
|
|
select * from t4;
|
|
|
|
|
a
|
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
INSERT INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 6;
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete
|
|
|
|
|
select * from t4;
|
|
|
|
|
a
|
|
|
|
|
1
|
|
|
|
@@ -692,7 +692,7 @@ WHERE EXISTS (SELECT c FROM t3 LEFT JOIN t2 ON b = d)
|
|
|
|
|
HAVING field1 > 'aaa' LIMIT ROWS EXAMINED 20;
|
|
|
|
|
field1
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 21 rows, which exceeds LIMIT ROWS EXAMINED (20). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 20. The query result may be incomplete
|
|
|
|
|
EXPLAIN
|
|
|
|
|
SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 14;
|
|
|
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
|
|
@@ -702,13 +702,13 @@ SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 14;
|
|
|
|
|
a
|
|
|
|
|
USA
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 15 rows, which exceeds LIMIT ROWS EXAMINED (14). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 14. The query result may be incomplete
|
|
|
|
|
SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 15;
|
|
|
|
|
a
|
|
|
|
|
USA
|
|
|
|
|
CAN
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 16 rows, which exceeds LIMIT ROWS EXAMINED (15). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 15. The query result may be incomplete
|
|
|
|
|
SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 16;
|
|
|
|
|
a
|
|
|
|
|
USA
|
|
|
|
@@ -753,7 +753,7 @@ GROUP BY field1, field2, field3, field4, field5
|
|
|
|
|
LIMIT ROWS EXAMINED 120;
|
|
|
|
|
field1 field2 field3 field4 field5
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 121 rows, which exceeds LIMIT ROWS EXAMINED (120). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 120. The query result may be incomplete
|
|
|
|
|
SHOW STATUS LIKE 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 1
|
|
|
|
@@ -778,8 +778,8 @@ GROUP BY field1, field2, field3, field4, field5
|
|
|
|
|
LIMIT ROWS EXAMINED 124;
|
|
|
|
|
field1 field2 field3 field4 field5
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 125 rows, which exceeds LIMIT ROWS EXAMINED (124). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 127 rows, which exceeds LIMIT ROWS EXAMINED (124). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 124. The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 124. The query result may be incomplete
|
|
|
|
|
SHOW STATUS LIKE 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 1
|
|
|
|
@@ -822,7 +822,7 @@ WHERE b <= alias1.b OR e != alias2.c
|
|
|
|
|
) LIMIT ROWS EXAMINED 20;
|
|
|
|
|
a b c
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 25 rows, which exceeds LIMIT ROWS EXAMINED (20). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 20. The query result may be incomplete
|
|
|
|
|
drop table t1, t2, t3;
|
|
|
|
|
|
|
|
|
|
MDEV-174: LIMIT ROWS EXAMINED: Assertion `0' failed in net_end_statement(THD*)
|
|
|
|
@@ -839,7 +839,7 @@ WHERE c = (SELECT MAX(b) FROM t2)
|
|
|
|
|
LIMIT ROWS EXAMINED 3;
|
|
|
|
|
(SELECT MAX(c) FROM t1, t2)
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 3. The query result may be incomplete
|
|
|
|
|
drop table t1, t2;
|
|
|
|
|
|
|
|
|
|
MDEV-178: LIMIT ROWS EXAMINED: Assertion `0' failed in net_end_statement(THD*) on the
|
|
|
|
@@ -856,12 +856,12 @@ EXECUTE ps;
|
|
|
|
|
a
|
|
|
|
|
3
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 22 rows, which exceeds LIMIT ROWS EXAMINED (21). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 21. The query result may be incomplete
|
|
|
|
|
EXECUTE ps;
|
|
|
|
|
a
|
|
|
|
|
3
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 22 rows, which exceeds LIMIT ROWS EXAMINED (21). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 21. The query result may be incomplete
|
|
|
|
|
drop view v;
|
|
|
|
|
drop table t1, t2;
|
|
|
|
|
#
|
|
|
|
@@ -876,7 +876,7 @@ INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'
|
|
|
|
|
SET @@sql_mode='STRICT_TRANS_TABLES';
|
|
|
|
|
INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2;
|
|
|
|
|
Warnings:
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete
|
|
|
|
|
Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete
|
|
|
|
|
SET @@sql_mode=@old_mode;
|
|
|
|
|
DROP TABLE t1;
|
|
|
|
|
#
|
|
|
|
|