March 5, 2008 at 9:28 am
I have a general question is it better to join several tables when trying to get a result set i.e. 4 or more or is it better to create subsets of the result set via fewer table joins i.e. 2 and then build upon this until the desired result set has been reached i.e. you need a result set which will require accessing 4 tables do you join those 4 tables to get your desired result or do you join two tables get a subset of result set join next table get a subset of the result then join final table get desired result set.
Personally I find the second way (join two tables at a time) more readable but wondering if overall it is more efficient.
Any thoughts...
March 5, 2008 at 9:42 am
Here is my thought.
Regardless the indexes, there is no difference, assuming we only have full table scans. But there will be a lot of difference in 2X2 and 4X1 joins when . The efficiency of the joins heavily depends on how to join your tables, and how you use indexes.
More input will be more than welcome.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply