Please answer these questions before submitting your issue. Thanks!
CREATE TABLE `test_table` (
`id` bigint(20) NOT NULL COMMENT '主键',
`request_url` varchar(100) NOT NULL COMMENT '请求URL',
`scheme` varchar(10) NOT NULL COMMENT '协议',
`cost_time` bigint(18) NOT NULL COMMENT '耗时',
`query_string` varchar(500) NOT NULL DEFAULT 'query_string' COMMENT '请求信息',
`headers` json NOT NULL COMMENT '头信息',
`parameters` json NOT NULL COMMENT '参数',
`cookie` json NOT NULL COMMENT 'cookie',
`path_info` varchar(100) NOT NULL DEFAULT 'path_info' COMMENT 'path_info',
`CLIENT_VERSION` varchar(8) GENERATED ALWAYS AS (json_extract(`headers`, "$.CLIENT_VERSION")) VIRTUAL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_http_playback_request_url` (`request_url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8mb4_general_ci;
alter table test_table add index index_virual_client_version(CLIENT_VERSION);
admin show ddl,shows:|schema_ver|owner|job|self_id|
| ---- | --------------------- | ----- | ----- |
|667 |b9bdb1f7-03ba-4d13-a463-aa408681379d |ID:1264, Type:add index, State:running, SchemaState:write reorganization, SchemaID:1251, TableID:1261, RowCount:6580689, ArgLen:0, start time: 2018-02-06 20:45:00.128 +0800 CST |b9bdb1f7-03ba-4d13-a463-aa408681379d |
tidb-server -V or run select tidb_version(); on TiDB)?Release Version: v1.1.0-alpha.1-65-g8cc9e45
Git Commit Hash: 8cc9e45f419aba64c4ff63f676f66a948711525d
Git Commit Branch: master
UTC Build Time: 2018-02-05 02:55:59
GoVersion: go version go1.9.2 linux/amd64
Thanks for your feedback!
PTAL @zimulala
We will speed up the operation of adding index, see #5192.
@kitdine This issue was fixed by PR: #5964 , you can try the newest master branch. Appreciate to get your feedback :)
good to hear that,I will test it ASAP
@winkyao amazing! 4000w+ rows Reduced the cost time from two weeks to two hours
Most helpful comment
good to hear that,I will test it ASAP
@winkyao amazing! 4000w+ rows Reduced the cost time from two weeks to two hours