Bug #64197 | "Impossible WHERE noticed after reading const tables" message | ||
---|---|---|---|
Submitted: | 1 Feb 2012 20:34 | Modified: | 4 Jun 2012 14:40 |
Reporter: | Daniel Katz | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S4 (Feature request) |
Version: | 5.0.85-community-log | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | error message, impossible where |
[1 Feb 2012 20:34]
Daniel Katz
[1 Feb 2012 20:41]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php This message means no row which satisfied condition can be found in the table.
[1 Feb 2012 21:09]
Daniel Katz
> This message means no row which satisfied condition can be found in the table. I realize this. In fact, I pretty much stated as much above. Aren't feature requests as well as UI behavior and even back end behavior reported through this same vehicle? AFAIK, the only difference is the Severity. I'm making an argument for the fact that it's alarmist and ambiguous being error output rather than a warning and returning the expected dataset to the user. I reopened the status and changed the Severity back to "feature request" however I thought it was more appropriate as S3 since the server is not effectively saying what it's doing.
[4 Jun 2012 14:40]
Valeriy Kravchuk
IMHO it makes some sense to show 0 (zero) in "rows" column and put proper explanation in "Extra" column in this case... But if greedy optimizer, internally, does NOT continue to process the query in this case, it does not make much sense to show next (fictional) steps for other tables joined. Let's delegate final decision on this FR to product management.
[16 Oct 2013 9:23]
Martin Košický
Well i think this is a bug because I have a select which consists of 9 joins... (main query) Select a.foo1,b.foo2,c.foo3,d.foo4 FROM mainView as a LEFT JOIN view1 as b ON a.uuid=b.uuid LEFT JOIN view2 as c ON a.uuid=c.uuid LEFT JOIN view3 as d ON a.uuid=d.uuid Now view3 looks like this: Select a.col1,a.col2,a.col3 FROM status as a INNER JOIN status_snapshot as b ON a.ID=b.ID WHERE b.deleted = 0; Im trying to select after replications the current state of something. snapshot is basicly just pointing on the last deltas of status. Now If I have no data in status_snapshot and status I get "Impossible WHERE noticed after reading const tables" and the main query takes about an hour however If I add a dummy record into both status and status_snapshot and thus the view becomes not empty, my main query Select a.foo1,b.foo2,c.foo3,d.foo4 FROM mainView as a LEFT JOIN view1 as b ON a.uuid=b.uuid LEFT JOIN view2 as c ON a.uuid=c.uuid LEFT JOIN view3 as d ON a.uuid=d.uuid takes 5 seconds to complete, it's not a win but still better. I suspect that that fail gets propagated into the main query and the optimizer collapses or something. Please send feedback on this situation. Thanks.
[6 Dec 2013 20:53]
Brad Plumlee
This also occurs with MySQL 5.5.32 Enterprise. I am trying to find out why a query took 4 minutes to run. My specific query had one table. Data moves in/out so quickly the criteria changed so that the Explain is useless. The Explain should show what assumptions the Optimizer will make based on what stats it knows and the structure of the tables, join or no join.