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>;
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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now