Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT subset optimization
Message
From
18/02/1997 15:32:07
 
 
To
18/02/1997 15:03:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00020942
Message ID:
00020948
Views:
44
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform