mariadb/mysql-test/suite/vcol/r/vcol_rewrite_covering.result
2025-05-28 12:17:55 +03:00

12 lines
465 B
Text

create table t (c int);
insert into t select seq from seq_1_to_10000;
alter table t
add column vc int as (c + 1),
add index(vc);
explain select vc from t order by c + 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t index NULL vc 5 NULL 10000 Using index
explain select vc from t order by c + 1 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t index NULL vc 5 NULL 10 Using index
drop table t;