Jerry,
Do you have DELETED set ON? If so, VFP essentially converts your SELECT into something like this:
SELECT ssn FROM employ WHERE UPPER(ssn)="111111111" AND !DELETED()
If you SET DELETED OFF or add an index tag on DELETED() you'll get full optimization. However, the DELETED() tag can sometimes actually slow things down and you won't get much better performance anyway unless you have lots of deleted records.
>I am trying to optimize SELECT statement and using function SYS(3054,1) for checking level of optimization.
>
>SELECT ssn FROM employ WHERE UPPER(ssn)="111111111"
>returns 'partial' level of optimization, even I have index on UPPER(ssn). Why and what I'm doing wrong?
>I would like to have 'full' optimization level.
>Thanks in advance.
>Jerry