如下例所示,将三个或更多表连接在一起是否是一个好主意。我正在努力关注性能。有没有什么办法可以重写这个查询,效率更高,执行速度更快?我试图让尽可能简单化。非常感谢您的回答是否有加入3个或更多表的替代方案?
select * from a
join b on a.id = b.id
join c on a.id = c.id
join d on c.id = d.id
where a.property1 = 50
and b.property2 = 4
and c.property3 = 9
and d.property4 = 'square'
根据我的小知识,它看起来不错只有.. – 2012-03-27 19:32:53
性能您需要替换'*'只有你需要的列。 – 2012-03-27 19:45:21