Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are subqueries optimizable in a view?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01337231
Message ID:
01337290
Vues:
13
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform