3 ms·
Um, it's not a bug - how would you purposely execute a subquery against every row in a table? It's doing exactly what you told it to do. The bug is a human bu
by ck2 15y ago
Um, it's not a bug - how would you purposely execute a subquery against every row in a table?
It's doing exactly what you told it to do.
The bug is a human bug of not understanding what you are asking even though it seems logical.
- gaius 15y agoIf it's impossible then why do both Oracle and SQL Server handle this scenario correctly? I've just tried it on both. (I do know the answer - it's because they can do hash joins and MySQL can't).
- soysamurai 15y agoExcept that in the specific example I have (this is my post), the results of the inner select (I would assume) should be cached because the condition in the inner select is a fixed set of criteria, not related at all to the outer records. Also of interest is that NOT IN(insert subselect here) doesn't raise the same issue. Additionally it prevents the entire query from using any indices... I have lots of interesting query planner results from this particular go around. Also it's been fixed in 6.0-alpha just not back-ported, so I'm not sure I agree here.