>>Here's the problem. I have an integer field that I am seeking against. The field has a tag. The table I am using has 12300 records. When I use Locate For fld = exp and there is an 8 second delay. Each proceeding call to the same Locate For is almost instantaneous. If I set an order and seek the value the seek is almost instantaneous.
>>
>>Now using private data sessions. Every time I use that Locate For within my search form which uses the Locate For, there is an 8 second delay. Again using seek I get instantaneous results. Character fields the Locate For works the same as the seek.
>>
>>
>>USE LM01
>>LOCATE FOR lm01.IPAGENO = 1500
>>
>>USE LM01 ORDER PAGENO
>>SEEK 1500
>>
>>Am I doing something wrong here or are other people experiencing the same slow down.
>
>LOCATE FOR does not take into account the index tags, whereas SEEK does. This is why you see a definite performance difference.
That's not 100% true. LOCATE is rushmore optimizable command, however it should be 100% correlation between index tag expression and expression in locate for clause. It might be (I'm not sure here), that alias in above example does some harm.
Edward Pikman
Independent Consultant