Chris wrote:
<snip>
> Hmm. Must be a recent change, I've had problems with that in the past.
>
> Thanks for the pointers.

You're welcome. I'm not sure which part you think is a recent change. Certainly, mysql 5 with its demotion of the precedence of the implicit join is recent. Perhaps it depends on your definition of recent. According to the manual <http://dev.mysql.com/doc/refman/4.1/en/join.html>, putting the join condition in an ON clause was first supported for INNER JOIN as of 3.23.17, and for JOIN starting with 4.0.11. Is that what you mean?

Chris wrote:

EXPLAIN is documented in the manual <http://dev.mysql.com/doc/refman/4.1/en/explain.html>.

So it is, but it doesn't show me the decisions it makes. It shows me whether it will use an index or not, it won't show me how it puts the whole thing together.

Well, I think that information is there, unless I'm mistaking what you mean. Mysql joins the tables in the order given in the explain output. It shows whether or not an index is being used, how many rows are predicted to be examined, and how the rows will be sorted.

Compare to the postgres one:

http://www.designmagick.com/article/23/page/5

(yes I did write that article so I am biased)

which tells me what's going on at each step of the decision process.

Whether you find that useful or not - *shrug* - I however find it very useful and wish the mysql explain was as good as that.

I've not used postgresql, so I will make no claim as to the relative merits of each system's EXPLAIN. It appears you're in a better position to make comparisons. I'll just say that it takes some practice/experience to really get what mysql's EXPLAIN is telling you, and I gather from your article that the same could be said of postgresql's EXPLAIN. At least, I couldn't tell just from your article what useful info postgresql's EXPLAIN gives that mysql's does not. I wonder if it is possible that what you are looking for is hidden in mysql's EXPLAIN output in a way that isn't apparent to you. If you think that might be the case, and you told us what you're looking for, someone could say if it's there or not. On the other hand, you may be certain that's not the case. Then I'd be curious to hear about it.

Michael


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to