-
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
slow down when creating index. #5626
Comments
6 servers to deploy TiDB cluster. table schema:
create index statement: |
@DavisLinDB Data in the field of |
using AUTO_INCREMENT |
@DavisLinDB Do you delete the data randomly? |
No delete, just creating index and insert data. Insert statement: |
@DavisLinDB |
at first hour, insert data and adding index at the same time. Got 825 qps. |
@DavisLinDB |
Sent. Please check mail. |
@DavisLinDB Got it. Thanks! |
@DavisLinDB |
Any parameters or sql_hint to set adding index low priority let QPS stay normal performance? Or update network speed from gigabit to 10-gigabit can improve? |
@DavisLinDB |
This issue was fixed by PR: #5976 , you can try the newest master branch. Appreciate to get your feedback :) @DavisLinDB |
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
Create 64 connections to insert data to a single table, 4000~5000 records per seconds.
The table has 0.6 billion rows.
Then creating index for the table and insert data at the same time.
Before create index, 4.5k qps. When creating index, only 825 qps.
Any way to increase QPS when creating index?
The index creation time for 629663920 rows is 19 hours 43 min 54.23 sec, any way to improve?
MySQL [test]> create index IDX on testdata (adddate,agold,bgold);
Query OK, 0 rows affected (19 hours 43 min 54.23 sec)
What did you expect to see?
Faster.
What did you see instead?
When creating index, only 825 qps.
Create an index need 20 hours.
What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?Release Version: v1.0.4-1-ga05e014
Git Commit Hash: a05e014
Git Commit Branch: release-1.0
UTC Build Time: 2017-12-11 03:07:11
The text was updated successfully, but these errors were encountered: