Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizable expressions
Message
 
To
22/03/1999 04:14:33
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00200386
Message ID:
00200559
Views:
10
Hi Kin Keung,

>A table contains 1,000 records. 50 records have been marked for deletion and 100 records have a value 'X' in the id field. IF the following commands are executed separately, which one can enhance performance? Why?
>
>1. LIST FOR id = 'X' AND DELETED()
>
>2. LIST FOR DELETED() AND id = 'X'

When you have an index on DELETED() and ID, both should take the same time. If you don't have an index, the second one should be faster, because only in 50 cases the expression ID="X" has to be evaluated.

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform