Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
use test;
drop table if exists t;
create table t(a int);
insert into t values(1);
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
create view v as select * from t where a = (select max(t2.a) from t t2);
create view v2 as select * from t where a = (select max(t2.a) from t t2);
create view v3 as select * from t where a = (select max(t2.a) from t t2);
create view v4 as select * from t where a = (select max(t2.a) from t t2);
create view v5 as select * from t where a = (select max(t2.a) from t t2);
create view v6 as select * from t where a = (select max(t2.a) from t t2);
select count(1) from INFORMATION_SCHEMA.columns;
thanks for @wshwsh12
2. What did you expect to see? (Required)
before the fix, there's some warnings but the execution time is small
use v6.5.8
mysql> select count(1) from INFORMATION_SCHEMA.columns;
+----------+
| count(1) |
+----------+
| 4629 |
+----------+
1 row in set, 6 warnings (0.03 sec)
3. What did you see instead (Required)
after the fix, execution is slow
use nightly (~8.6)
mysql> select count(1) from INFORMATION_SCHEMA.columns;
+----------+
| count(1) |
+----------+
| 4981 |
+----------+
1 row in set (0.74 sec)
use v6.5.11
mysql> select count(1) from INFORMATION_SCHEMA.columns;
+----------+
| count(1) |
+----------+
| 4635 |
+----------+
1 row in set (0.66 sec)
4. What is your TiDB version? (Required)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
thanks for @wshwsh12
2. What did you expect to see? (Required)
before the fix, there's some warnings but the execution time is small
use v6.5.8
3. What did you see instead (Required)
after the fix, execution is slow
use nightly (~8.6)
use v6.5.11
4. What is your TiDB version? (Required)