Old habits die hard? :)
Re: Which statement is 'Better' Thread #
1048319 Message #
1331839>Hi Albert,
>
>Unfortunately, VFP doesn't show level of optimization when subqueries or correlated queries are used. Anyway, JOIN is usually faster in VFP. You may also try a correlated subquery but I doubt it'll be faster.
>
>
>* JOIN
>SELECT qt.Quote_ID ;
> FROM Quotes qt ;
> JOIN c_QuotesToDelete qtd ON qt.Quote_ID = qtd.Quote_ID
>
>* Correlated subquery
>SELECT qt.Quote_ID ;
> FROM Quotes qt ;
> WHERE EXISTS (SELECT * FROM c_QuotesToDelete qtd WHERE qt.Quote_ID = qtd.Quote_ID)
>
>>
If it's not broken, fix it until it is.
My Blog