Bug #19836 | Dependent subquery in on clause is not optimized effectively. | ||
---|---|---|---|
Submitted: | 16 May 2006 2:03 | Modified: | 14 Dec 2006 10:16 |
Reporter: | Gökhan Demir | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | all | OS: | Any (all) |
Assigned to: | Georgi Kodinov | CPU Architecture: | Any |
[16 May 2006 2:03]
Gökhan Demir
[16 May 2006 2:13]
Gökhan Demir
I have uploaded the bug-data-19836.tar.bz2 to mysql ftp side.
[4 Jul 2006 18:12]
MySQL Verification Team
Verified as described on Linux Suse 10.
[22 Aug 2006 14:33]
Cristiano Contin
I've the same problem; it looks that using views workaround the problem
[14 Dec 2006 10:16]
Georgi Kodinov
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead. Thank you for your interest in MySQL. This is actually a duplicate of bug #18465. MySQL tries to avoid re-optimization at execution time. And it can't decide on optimization time that certain subquery will be subject to range optimization using values from the outer context because these constants will vary for each execution and may cause great inefficiency of the range access. So unlike joins subqueries are not subject to range optimization when values that may change at execution time are involved. This may be extended by the ongoing subquery optimization additions that will be included into a future release.