-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
YCSB workloade is too slow for scan operation #9067
Comments
If the table is empty, the plan looks like:
so the limit is pushed down to TiKV if table is empty.
so the limit should have been pushed down in this workload, am I missing anything here? is the table supposed to be empty in the test workload? |
No, you need to load data at first. @breeswish has already told me that now TiDB doesn't support this query, we need to use index hint forcibly. |
@breeswish Could you please elaborate more on this problem here? thanks. |
@eurekaka From @breeswish's info:
So the planner thinks it is better to choose the table scan, as it assumes the keys are randomly spreaded in table, so scans 9/0.65 rows is enough. It is a known issue and will be fixed in the later. |
Hi @eurekaka This is the actual slow log:
The SQL is: SELECT field0,field1,field2,field3,field4 FROM usertable WHERE YCSB_KEY >= "user6107727503211566506" LIMIT 5; The plan is:
Notice that selectivity is high:
I have already talked with @lamxTyler about this issue, you can ask him for further information. |
@breeswish @lamxTyler thanks for the clarification, this can be solved after we know the order correlation between column and table/index. Keep this issue opened here for later revisit. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
I start a cluster with 1 PD + 1 TiKV + 1 TiDB, run go-ycsb with workloade like:
The workloade is little changed with 100% scan:
Scanning at most 10 items has better performance.
The performance is very pool.
From TiDB log
And TiKV log:
Seem Scan scans too many data, and the
limit
expression may not be pushed to TiKV.The schema is
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: