tidb: Query returns duplicated result
Bug Report
Please answer these questions before submitting your issue. Thanks!
-
What did you do? 执行sql :
select id,task_id from $table_name where task_id in (id1,id2,id3...) ORDER BY work_time, index_id;
说明:- sql的长度390k (in条件数量1万多个)
- id是主键
-
What did you expect to see? 同一条记录(主键id相同),出现一次
-
What did you see instead? 同一条记录(主键id相同),在返回结果中出现多次
-
What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)? 5.7.10-TiDB-v2.0.0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (11 by maintainers)
@shengbinxu Yes, alter table and change the index to the one without prefix column will also help.