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
select
very slow on an empty table from delete from xx
#52905
Comments
the cause is after GC, the kv is not compacted, so it's still scanned, but skipped, see for tidb_ddl_job, we will insert and delete after process, if we have a lot of ddl, such as create 1M tables, query from it will be slow even it's almost empty.
|
we can use tikv ctl to compact manually, after that there's no delete_skipped_count we need compact default and write cf together in this case
|
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
tiup playground
60ms
. also test another table with524288
rows, then empty it withdelete from
, it takes440ms
to query it.2. What did you expect to see? (Required)
very fast to query
3. What did you see instead (Required)
slow compared to a new created empty table
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: