You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/05/22 08:22:23 UTC
[GitHub] [incubator-shardingsphere] yaoyuandota edited a comment on issue #2426: 请问什么时候可以优化 in 查询,
yaoyuandota edited a comment on issue #2426: 请问什么时候可以优化 in 查询,
URL: https://github.com/apache/incubator-shardingsphere/issues/2426#issuecomment-494703756
> **For English only**, other languages will not accept.
ok.... When can we optimize 'in' queryfor example: db1 (table_1, table_3, table_5), db2(table_0,table_2,table_4). sharding key is 'id'.sharding role is 'id %6'。 We have 3 records : id = 1, id = 2, id =4 。 so the real sql is : select * from db1.table_1 where id in (1 ,2,4) , select * from db2.table_2 where id in (1 ,2,3), select * from db2.table_4 where id in (1 ,2,3). so much in,it is not necessary i think。if we do batchGetByids => in (.............), it will do in all tables, it is inefficient i think。
--
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services