2bigpigs Posted November 20, 2011 Posted November 20, 2011 I read that the FROM statement is executed before the WHERE statement.So what i understand is:SELECT * FROM tbl_1 JOIN tbl_2 ON <condition> WHERE tbl_1.id='value';Would first join the 2 tables according to the ON condition and then go about retrieving rows according to the WHERE condition. So would this be faster?:SELECT * FROM (SELECT * FROM tbl_1 WHERE tbl_1.id='value')A JOIN tbl_2 ON <condition>; Quote
2bigpigs Posted November 22, 2011 Author Posted November 22, 2011 I reused this topic since i solved my own problem.Wanted to give it a little bump but the posts didn't merge like i expected them to. Sorry More info: It's for use in a forums kind of system joining member info to the topic info Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.