JOIN vs WHERE clause.
I have a performance issue question for you.
I’ve got two tables TBL_ONE and TBL_TWO with primary key field on first table
PR_KEY and foreign key field on second table FRGN_KEY. I would like to get
some result data set from two tables, what should I use for better performance:
“SELECT * from TBL_ONE INNER JOIN TBL_TWO ON PR_KEY=FRGN_KEY
“SELECT * FROM TBL_ONE, TBL_TWO WHERE PR_KEY=FRNG_KEY AND
And I guess there are two general questions here, first – is JOIN faster
then WHERE clause, second – what is processed first on SQL Server WHERE clause
or JOIN part of SQL statement(meaning when JOIN is used, does SQL Server
joins tables first and then selects rows according the WHERE clause or first
does WHERE and then tries to join result sets).
Any input would be greatly appreciated.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL