Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use select... where EXISTS ... ?
Message
From
27/05/2003 14:06:37
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00793069
Message ID:
00793196
Views:
31
>>Sergey,
>>
>>>However, this test only shows how many records where processed by query and subquery. I doesn't take in account other factors. If you run speed tests you'll find out that in VFP IN subquery is faster in most cases than EXISTS.
>>
>>I never use EXISTS, I honestly think that INNER JOIN does that much better.
>>
>>It's also my experience with large tables over a network that NOT EXISTS is much faster than NOT IN. Later tonight I'll try to create a better test.
>
>Hi David,
>
>It's interesting to note that in SQL Server all three queries (IN, EXISTS and JOIN) most likely will produce the same execution plan. VFP query optimizer isn't that smart. :)

But I hope that VFP is at least smart enough with EXISTS or NOT EXISTS to know that the answer is clear once a single record is returned.
Previous
Reply
Map
View

Click here to load this message in the networking platform