Bug #21939 | EXPLAIN EXTENDED does not return information "as advertised" in manual | ||
---|---|---|---|
Submitted: | 31 Aug 2006 5:52 | Modified: | 5 Dec 2007 18:56 |
Reporter: | Arjen Lentz | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S4 (Feature request) |
Version: | 4.1 and up, 5.0.36-BK | OS: | Any (any) |
Assigned to: | CPU Architecture: | Any | |
Tags: | explain, optimisation, optimiser, optimization, Optimizer |
[31 Aug 2006 5:52]
Arjen Lentz
[31 Aug 2006 10:12]
Valeriy Kravchuk
Thank you for a problem report.
[19 Sep 2006 8:39]
Sergei Golubchik
Arjen, what do you mean "not showing const optimization" ? It showed that the query ON c.code=s.country WHERE c.code='AUS' was rewritten to WHERE Code = 'AUS' AND Country = 'AUS' It looks to me like an example of constant propagation, do you mean some other "const optimization" here ? As for "re-ordering of join tables" - indeed, it doesn't show it, but it's - as you noted - an "item tree dumper", and tables are not items, and they're not part of the item tree. Making EXLPAIN EXTENDED to show the join order is a feature request.
[20 Sep 2006 0:12]
Arjen Lentz
Sergei, you're right in it does indeed show the const optimisation in some sense, that it's put in the where clause and there's no longer a join condition in the where clause. However, as I understand it, the optimiser actually picks up the data for the const row and replaces the entries in the query so the underlying table is no longer referenced. That is not reflected in the output. So apart from join order are not being displayed, a table that's no longer referenced (since it's been replaced by constants) *is* displayed. There's also another bug report on it not actually displaying a where clause at all in certain situation (just shows () instead) perhaps the two issues can be sorted out together. I appreciate that internally it may be true that a table is not part of the item tree, but that's quite irrelevant to a user. They want to see what's going on, this feature purports to do that, and does not. It serves no purpose to debate architectural semantics, wouldn't you agree? ;-)
[6 Oct 2006 16:55]
Sergei Golubchik
see also bug#22331
[18 Aug 2007 1:37]
Igor Babaev
- This entry cannot be considered as a request as there is no specification of the required feature. By the above reason I move the case to 'Not a bug'.
[18 Aug 2007 2:15]
Arjen Lentz
Hi Igor, thanks for your feedback. The report comes from user experience, with EXPLAIN not actually being clear about what is going on. The problem is described fairly well, I thought - Sergei also picked up on it and some other aspects were already fixed in a related bug report. Now, how to make the unclear info clearer, there are various possibilities - you're the expert and a developer, coming up with solutions is probably your gig, right? I'd be happy to toss in some ideas, however I am not familiar with this part of the code so my suggestions may be unpractical. In any case, given the bug title, I would guess that either EXPLAIN EXTENDED is adjusted, and/or the documention changed. Marking it as "not a bug" does not seem appropriate, as that would mean that the documentation still says stuff that is not actually correct. Thanks.
[18 Aug 2007 19:46]
Valeriy Kravchuk
Based on Igor's explanation and Arjen's comment, I think, this is a valid documentation request/bug for 5.0 and 4.1, and/or a feature request for some future version, > 5.1.