Subject | select sql comparison |
---|---|
Author | James Chua |
Post date | 2003-07-17T08:25:54Z |
Clean Clean DocumentEmail MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";}
which must faster?
select col1, col2, (select col3 from tableb t2 where t2.colx = t1.colx) as co3
from tablea t1
or
select t1.col1, t1.col2, t2.col3
from tablea t1 leftjoin tableb t2 on t1.colx = t2.colx
which query will result to a faster execution?Let say the colx is index. Will the difference bevery big in a large dataset?
by the way do we call the first query as embeded select or nested select or sub select?
thanks
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
[Non-text portions of this message have been removed]
which must faster?
select col1, col2, (select col3 from tableb t2 where t2.colx = t1.colx) as co3
from tablea t1
or
select t1.col1, t1.col2, t2.col3
from tablea t1 leftjoin tableb t2 on t1.colx = t2.colx
which query will result to a faster execution?Let say the colx is index. Will the difference bevery big in a large dataset?
by the way do we call the first query as embeded select or nested select or sub select?
thanks
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
[Non-text portions of this message have been removed]