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

table: Speed up the add index operation #4632

Merged
merged 5 commits into from Sep 28, 2017

Conversation

Projects
None yet
5 participants
@zimulala
Member

zimulala commented Sep 25, 2017

Using 4 TiKV, 1 PD, 2 TiDB , the servers of TiKV and TiDB are not on a computer.
The number of records in this table is 100,000,000, and the table's structure is as follows:
CREATE TABLE tt (
a int(11) DEFAULT NULL,
b varchar(256) DEFAULT NULL,
c varchar(256) DEFAULT NULL,
d int(11) DEFAULT NULL,
e int(11) DEFAULT NULL,
f int(11) DEFAULT NULL)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin

tidb-before : adding an index f takes time 35m33.008533773s
tidb-current: adding an index d takes time 35m1.221069105s

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Sep 25, 2017

Member

Seems there is no improvement?

Member

shenli commented Sep 25, 2017

Seems there is no improvement?

Show outdated Hide outdated table/tables/index.go Outdated
@zimulala

This comment has been minimized.

Show comment
Hide comment
@zimulala
Member

zimulala commented Sep 26, 2017

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Sep 26, 2017

Member

LGTM

Member

coocood commented Sep 26, 2017

LGTM

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Sep 26, 2017

Member

How about use colMap map[int64]*types.FieldType directly?

Member

coocood commented Sep 26, 2017

How about use colMap map[int64]*types.FieldType directly?

@zimulala

This comment has been minimized.

Show comment
Hide comment
@zimulala

zimulala Sep 26, 2017

Member

I need used this structure in #4437

Member

zimulala commented Sep 26, 2017

I need used this structure in #4437

@zimulala

This comment has been minimized.

Show comment
Hide comment
@zimulala

zimulala Sep 27, 2017

Member

@coocood I closed #4437, so I address your comments.

Member

zimulala commented Sep 27, 2017

@coocood I closed #4437, so I address your comments.

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli
Member

shenli commented Sep 28, 2017

@winkyao

LGTM

@winkyao

This comment has been minimized.

Show comment
Hide comment
@winkyao

winkyao Sep 28, 2017

Member

/run-all-tests

Member

winkyao commented Sep 28, 2017

/run-all-tests

@zimulala zimulala added status/LGT2 and removed status/LGT1 labels Sep 28, 2017

@iamxy

This comment has been minimized.

Show comment
Hide comment
@iamxy

iamxy Sep 28, 2017

Member

/run-common-test

Member

iamxy commented Sep 28, 2017

/run-common-test

@coocood coocood merged commit d782ce1 into master Sep 28, 2017

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ci/circleci Your tests passed on CircleCI!
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@coocood coocood deleted the zimuxia/speedup-idx branch Sep 28, 2017

tiancaiamao added a commit that referenced this pull request Sep 28, 2017

hanfei1991 added a commit that referenced this pull request Sep 28, 2017

*: revert 4669 "make prepare stmt retriable when schema is out-dated" (
…#4676)

* Revert "executor: analyze use NewSelectResult (#4667)"

This reverts commit d1d78b7.

* Revert "table: Speed up the add index operation (#4632)"

This reverts commit d782ce1.

* Revert "*: make prepare stmt retriable when schema is out-dated. (#4669)"

This reverts commit 3dfbf52.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment