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