Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INFORMATION_SCHEMA.columns performance regression after fix #54343 #58184

Closed
lance6716 opened this issue Dec 12, 2024 · 1 comment · Fixed by #58203
Closed

INFORMATION_SCHEMA.columns performance regression after fix #54343 #58184

lance6716 opened this issue Dec 12, 2024 · 1 comment · Fixed by #58203
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. component/ddl This issue is related to DDL of TiDB. report/customer Customers have encountered this bug. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@lance6716
Copy link
Contributor

lance6716 commented Dec 12, 2024

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)

@lance6716 lance6716 added the type/bug The issue is confirmed as a bug. label Dec 12, 2024
@lance6716 lance6716 changed the title performance regression after fix #54343 INFORMATION_SCHEMA.columns performance regression after fix #54343 Dec 12, 2024
@lance6716 lance6716 added severity/moderate affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. labels Dec 12, 2024
@lance6716
Copy link
Contributor Author

I choose affected versions based on which release version #54791 is picked to

@ti-chi-bot ti-chi-bot bot closed this as completed in 3ccd7e6 Dec 12, 2024
@jebter jebter added the component/ddl This issue is related to DDL of TiDB. label Dec 13, 2024
@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. component/ddl This issue is related to DDL of TiDB. report/customer Customers have encountered this bug. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants