Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT subset optimization
Message
De
18/02/1997 15:32:07
 
 
À
18/02/1997 15:03:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00020942
Message ID:
00020948
Vues:
40
>We talked about that 2 weeks ago related to know if a subset is faster than a relational SQL.
>
>I presently have this.
>
>SELECT PRENOM,NOM FROM MEMBER WHERE EXISTS (SELECT NOMEMBER FROM LISTSERV WHERE NOCLIENT=5 AND LISTSERV.NOMEMBER=MEMBER.NUMERO)
>
>My MEMBER table is having 10000 recors and LISTSERV table about 100. I can't obtain an immediate result. It is taken a few seconds. How can I optimize this SQL?

Surely, it must be tested, but I would write:
SELECT PRENOM,NOM FROM MEMBER WHERE NUMERO IN (SELECT NOMEMBER FROM LISTSERV WHERE NOCLIENT=5)
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform