I have few questions on SQL..
How to analyze the performance of a query? Any software, inbuilt features of MSSQL server 2005/2008?
What shou
SELECT * FROM enquiry_courses as Courses, enquiries as Enquiries WHERE Enquiries.session_id = '4cd3420a16dbd61c6af58f6199ac00f1' AND Courses.enquiry_id = Enquiries.enquiry_id
3.Exists is better for performance.
EDIT: Exists & IN are better than JOIN for performance issues.
EDIT: I re-wrote the query so that it's faster (I put the most restrictive condition first in the WHERE close)