>Hi Sergey
>
>From my testing it appears that the Deleted() index is needed in order to get full optimization. Setting DELETED ON or OFF does change whether optimization is Full or Partial and probably affects performance.
>
>There appears to be some other slight changes in the way optimization is performed with regard to composite (complex) indicies but I have rectified these by changing the index.
>
>There also appears to be a slight degredation with macro substitution but I suspect that this is more to do with caching than anything else.
>
>Regards
>Geoff
>
>>SET DELETED OFF w/o index on DELETED() also will yield full optimizaion.
>>>
>>>It may be tied in with SET DELETED OFF. The different environments may be acting differently.
>>>Generally, I have not added a Deleted() index. Thete is not one in this case.
>>>
>>>Time for some more testing. I'll get back to you.
>>>
On VFP9 you can optimize a condition and deleted() with a single index:
INDEX ON keyExpression FOR .NOT.DELETED() TAG someTag
Fabio