shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

多表关联以及子查询没有走分表逻辑

Open zhangxiao918 opened this issue 10 years ago • 2 comments

例如: select a.* from tbl_a a, tbl_b b where a.bid = b.id and b.id = 1000 其中 a表中的bid有分表的策略。实际执行下来没有走分表的逻辑。是否是因为配置的问题?麻烦解答一下!。

zhangxiao918 avatar Jul 26 '16 03:07 zhangxiao918

请提供配置,代码以及trace log

terrymanu avatar Aug 01 '16 17:08 terrymanu

因为a表在where条件中没有任何的条件,像这句sql中的 b.id=1000 a.bid = b.id 那么a.bid也应该是1000,这种传递关系sjdbc是不支持的。你需要显示的去指定a.bid=1000

hanahmily avatar Aug 02 '16 06:08 hanahmily