List:General Discussion« Previous MessageNext Message »
From:Chris W Date:August 25 2010 6:48pm
Subject:To join or not to join?
View as plain text  
I need a single row from 2 different tables.  It is rather trivial to 
create a join that will join these two tables and give me all the 
information I want in one query.  It is also fairly easy to just execute 
two different queries with out any join and get the data I need.  Since 
the both single table queries or the join query will always only return 
a single row, I was wondering if there was a performance hit doing it 
one way or the other.  On one table the where clause is on the primary 
key on the other table there where clause is on a single column that is 
indexed but not unique.  However in this situation it will be unique.  I 
can't put a unique key on this field in the second table because there 
are other applications of the second table where I do need it to non 

Hope that makes sense.

Chris W
To join or not to join?Chris W25 Aug