We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
main
两张表关联join,假设驱动表的连接字段是非索引字段,该条规则会误触发.无论驱动表连接字段有没有索引,驱动表走的都是全表扫描,所以规则只需要判断被驱动表连接字段是否是索引字段即可,不需要判断驱动表连接字段是不是索引字段.
CREATE TABLE t1 ( c1 int, c2 int, INDEX (c1) ); CREATE TABLE t2 ( c1 int, INDEX (c1) );
SELECT * FROM t1 LEFT JOIN t2 ON t1.c2 = t2.c1;
规则对驱动表连接字段检测是否是索引字段导致的
参考: left/right join 不判断驱动表连接字段是否是索引字段,innner join 根据执行计划结果得出哪张表驱动表
The text was updated successfully, but these errors were encountered:
ColdWaterLW
No branches or pull requests
版本信息(Version)
main
问题描述(Describe)
两张表关联join,假设驱动表的连接字段是非索引字段,该条规则会误触发.无论驱动表连接字段有没有索引,驱动表走的都是全表扫描,所以规则只需要判断被驱动表连接字段是否是索引字段即可,不需要判断驱动表连接字段是不是索引字段.
截图或日志(Log)
如何复现(To Reproduce)
问题原因
规则对驱动表连接字段检测是否是索引字段导致的
解决方案
参考:
left/right join 不判断驱动表连接字段是否是索引字段,innner join 根据执行计划结果得出哪张表驱动表
变更影响面
受影响的模块或功能
外部引用的潜在问题或风险
版本兼容性
测试建议
The text was updated successfully, but these errors were encountered: