February 23rd, 2013, 05:56 PM
Then I won't do it
I do not know the internal workings of MySQL or any other SQL engine, but maybe I should try to educate myself. Are you saying that the source code first figures out which table to deal with first (I understand that just cause I put table1 first in the query doesn't guarantee it will be run first, but go with me..), then filters the table based on the WHERE, then JOINs the next table, and filters again based on the WHERE, etc, etc?
February 23rd, 2013, 06:30 PM
Originally Posted by NotionCommotion
i'm saying that if you have FROM x JOIN y JOIN z WHERE z.foo=42 then it would make more sense if written FROM z JOIN y JOIN x WHERE z.foo=42
since that's the way it's going to be executed, why not write it that way