Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is SELECT ... IN (subquery) Optimized?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Is SELECT ... IN (subquery) Optimized?
Divers
Thread ID:
00557577
Message ID:
00557577
Vues:
53
Hi Everyone,

This query returns no records:

SELECT gen.file_id ;
FROM datatrac!gen gen ;
WHERE gen.trade_no = 0 .AND. (gen.app_date >= DATE()-30) ;
INTO CURSOR tmp_cur1 NOFILTER

This query takes 50 seconds to execute:

SELECT gen.int_rate ;
FROM gen ;
WHERE gen.file_id IN (SELECT file_id FROM tmp_cur1) INTO CURSOR tmp_cur2

Because the first query has NO records and because it's taking 50 seconds, my assumption is that the 2nd query is not optimized. Does anybody know if SELECT ... IN (subquery) is unoptimized IN VFP 6.0?

Please help if you can. Thank you. Good to see all of you at the DevCon. Need to update my picture. I think that's from highschool! :)

Shawn Nelson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform