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

Query to is.tables is slow in infoschema cache v2 #57295

Closed
tangenta opened this issue Nov 11, 2024 · 1 comment · Fixed by #57296
Closed

Query to is.tables is slow in infoschema cache v2 #57295

tangenta opened this issue Nov 11, 2024 · 1 comment · Fixed by #57296
Assignees
Labels
affects-8.5 component/ddl This issue is related to DDL of TiDB. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@tangenta
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Create a TiDB cluster that has a lot of schemas and tables.
  2. Execute select * from information_schema.tables where table_name = 'xx'

2. What did you expect to see? (Required)

It should complete fast.

3. What did you see instead (Required)

It takes about 400ms to finish a query. From the CPU profile, we can see there are many cache misses.

image

4. What is your TiDB version? (Required)

e16613d

@tangenta tangenta added the type/bug The issue is confirmed as a bug. label Nov 11, 2024
@tangenta tangenta changed the title Query to is.tables is slow when infoschema cache v2 is enabled Query to is.tables is slow in infoschema cache v2 Nov 11, 2024
@tangenta
Copy link
Contributor Author

executor.getAutoIncrementID() should not trigger loadTableInfo().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.5 component/ddl This issue is related to DDL of TiDB. 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