Quelle mdev-34413-icp-reverse-order.result
Sprache: Lisp
create table ten(a int);
insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table one_k(a int);
insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
create table t10 (a int, b int, c int, key(a,b));
insert into t10 select a,a,a from one_k;
select * from t10 force index(a) where a between 10and20and b+1 <3333 order by a desc, b desc;
a b c 202020 191919 181818 171717 161616 151515 141414 131313 121212 111111 101010
explain select * from t10 force index(a) where a between 10and20and b+1 <3333 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t10 range a a 5 NULL 11 Using index condition
flush status;
select * from t10 force index(a) where a between 10and20and b+1 <3333 order by a desc, b desc;
a b c 202020 191919 181818 171717 161616 151515 141414 131313 121212 111111 101010
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 11
HANDLER_ICP_MATCH 11
select * from t10 force index(a) where a between 10and20and b+1 <3333 order by a asc, b asc;
a b c 101010 111111 121212 131313 141414 151515 161616 171717 181818 191919 202020
explain select * from t10 force index(a) where a between 10and20and b+1 <3333 order by a asc, b asc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t10 range a a 5 NULL 11 Using index condition
flush status;
select * from t10 force index(a) where a between 10and20and b+1 <3333 order by a asc, b asc;
a b c 101010 111111 121212 131313 141414 151515 161616 171717 181818 191919 202020
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 11
HANDLER_ICP_MATCH 11
select * from t10 force index(a) where a=10and b+1 <3333 order by a desc, b desc;
a b c 101010
explain select * from t10 force index(a) where a=10and b+1 <3333 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t10 ref a a 5 const 1 Using index condition; Using where
flush status;
select * from t10 force index(a) where a=10and b+1 <3333 order by a desc, b desc;
a b c 101010
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 1
HANDLER_ICP_MATCH 1
select * from t10 force index(a) where a=10and b+1 <3333 order by a asc, b asc;
a b c 101010
explain select * from t10 force index(a) where a=10and b+1 <3333 order by a asc, b asc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t10 ref a a 5 const 1 Using index condition; Using where
flush status;
select * from t10 force index(a) where a=10and b+1 <3333 order by a asc, b asc;
a b c 101010
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 1
HANDLER_ICP_MATCH 1
select * from t10 force index(a) where a=10and b+1 <3333 order by a asc, b desc;
a b c 101010
explain select * from t10 force index(a) where a=10and b+1 <3333 order by a asc, b desc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t10 ref a a 5 const 1 Using index condition; Using where
flush status;
select * from t10 force index(a) where a=10and b+1 <3333 order by a asc, b desc;
a b c 101010
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 1
HANDLER_ICP_MATCH 1
select * from t10 force index(a) where a=10and b+1 <3333 order by a desc, b asc;
a b c 101010
explain select * from t10 force index(a) where a=10and b+1 <3333 order by a desc, b asc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t10 ref a a 5 const 1 Using index condition; Using where
flush status;
select * from t10 force index(a) where a=10and b+1 <3333 order by a desc, b asc;
a b c 101010
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 1
HANDLER_ICP_MATCH 1
create table t1 (a int, b int, c int, key(a,b));
insert into t1 (a, b, c) values (1,10,100),(2,20,200),(3,30,300),(4,40,400),(5,50,500),(6,60,600),(7,70,700),(8,80,800),(9,90,900),(10,100,1000);
select * from t1 where a >= 3and a <= 3 order by a desc, b desc;
a b c 330300
explain select * from t1 where a >= 3and a <= 3 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 5 NULL 1 Using index condition
flush status;
select * from t1 where a >= 3and a <= 3 order by a desc, b desc;
a b c 330300
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 1
HANDLER_ICP_MATCH 1
select * from t1 where a >= 3and a <= 3 order by a asc, b asc;
a b c 330300
explain select * from t1 where a >= 3and a <= 3 order by a asc, b asc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 5 NULL 1 Using index condition
flush status;
select * from t1 where a >= 3and a <= 3 order by a asc, b asc;
a b c 330300
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 1
HANDLER_ICP_MATCH 1
drop table t1;
create table t1 (a int, b int, c int, key(a,b));
insert into t1 (a, b, c) values (1,10,100),(2,20,200),(3,30,300);
select * from t1 where a >= 2and a <= 2 order by a desc, b desc;
a b c 220200
explain select * from t1 where a >= 2and a <= 2 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 5 NULL 1 Using index condition
flush status;
select * from t1 where a >= 2and a <= 2 order by a desc, b desc;
a b c 220200
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 1
HANDLER_ICP_MATCH 1
select * from t1 where a >= 2and a <= 2 order by a asc, b asc;
a b c 220200
explain select * from t1 where a >= 2and a <= 2 order by a asc, b asc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 5 NULL 1 Using index condition
flush status;
select * from t1 where a >= 2and a <= 2 order by a asc, b asc;
a b c 220200
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 1
HANDLER_ICP_MATCH 1
drop table ten, one_k, t10, t1;
create table t1 (
a int not null,
b int not null,
c int not null,
key (a,b)
) partition by range ((a)) (
partition p0 values less than (5),
partition p1 values less than (10),
partition p2 values less than (15),
partition p3 values less than (20)
);
insert into t1 (a,b,c) values (1,1,1),(2,2,2),(3,3,3),
(4,4,4),(5,5,5),(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15),
(16,16,16),(17,17,17),(18,18,18),(19,19,19);
select * from t1 where a >= 3and a <= 7 order by a desc;
a b c 777 666 555 444 333
explain select * from t1 where a >= 3and a <= 7 order by a desc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 4 NULL 5 Using index condition
flush status;
select * from t1 where a >= 3and a <= 7 order by a desc;
a b c 777 666 555 444 333
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 5
HANDLER_ICP_MATCH 5
select * from t1 where a >= 3and a <= 7 order by a desc, b desc;
a b c 777 666 555 444 333
explain select * from t1 where a >= 3and a <= 7 order by a desc, b desc;
id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 4 NULL 5 Using index condition
flush status;
select * from t1 where a >= 3and a <= 7 order by a desc, b desc;
a b c 777 666 555 444 333
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 5
HANDLER_ICP_MATCH 5
drop table t1;
create table t1 (
pk int primary key,
kp1 int, kp2 int,
col1 int,
index (kp1,kp2)
) partition by hash (pk) partitions 10;
insert into t1 select seq, seq, seq, seq from seq_1_to_1000;
select * from t1 where kp1 between 950and960and kp2+1 >33333 order by kp1 asc, kp2 asc;
pk kp1 kp2 col1
flush status;
select * from t1 where kp1 between 950and960and kp2+1 >33333 order by kp1 asc, kp2 asc;
pk kp1 kp2 col1
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 11
HANDLER_ICP_MATCH 0
select * from t1 where kp1 between 950and960and kp2+1 >33333 order by kp1 desc, kp2 desc;
pk kp1 kp2 col1
flush status;
select * from t1 where kp1 between 950and960and kp2+1 >33333 order by kp1 desc, kp2 desc;
pk kp1 kp2 col1
SELECT * FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME LIKE '%icp%';
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ICP_ATTEMPTS 11
HANDLER_ICP_MATCH 0
drop table t1;
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.