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 information_schema.ddl_jobs is very slow #55725

Closed
3AceShowHand opened this issue Aug 28, 2024 · 1 comment
Closed

query information_schema.ddl_jobs is very slow #55725

3AceShowHand opened this issue Aug 28, 2024 · 1 comment
Assignees
Labels
type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@3AceShowHand
Copy link
Contributor

Feature Request

Is your feature request related to a problem? Please describe:

We'd like to query the tidb to know the ddl job status, by running the following query, it takes more than 20 seconds return the result, it's too slow.

SELECT JOB_ID, JOB_TYPE, SCHEMA_STATE, SCHEMA_ID, TABLE_ID, STATE, QUERY
FROM information_schema.ddl_jobs
WHERE DB_NAME = "%s" 
    AND TABLE_NAME = "%s"
    AND JOB_TYPE LIKE "add index%%"
    AND (STATE = "running" OR STATE = "queueing")
LIMIT 1;

Describe the feature you'd like:

The query above should return result very quick.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

@3AceShowHand 3AceShowHand added the type/feature-request Categorizes issue or PR as related to a new feature. label Aug 28, 2024
@3AceShowHand
Copy link
Contributor Author

ref pingcap/tiflow#11521

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants