Perhaps it's finding another porthist table and querying that? Do a display status before the query to ensure the index tags and collate are correct.
>Thank you, Craig. Though I was sure that CP is the same, I reindexed the table from scratch, and run select (CPcurrent 1252). NO effect, still NONE, optimization. Any other ideas?
>
>>Make sure the code page used when creating the indeces is the same that's currently set.
>>
>>>I am converting VFP7 application to VFP9 (SP1, version 3504).
>>>There is a table with ~5 million records having regular index expression based on four character fields: updflag+station+rec_type+grade
>>>
>>>I need to collect ~300 records using expression like:
>>>
>>>SELECT * from porthist where updflag+station+rec_type+grade=” “
>>>
>>>
>>>If enginebehavior is 70, it takes less than 0.5 sec, but if enginebehavior is 90, it takes more than 15 sec!
>>>
>>>SYS(3054,1) displays Rushmore optimization level NONE for 90, and PARTIAL for 70.
>>>Set optimize is ON
>>>Set ANSI is OFF
>>>Table has been packed and reindexed.
>>>
>>>What is wrong / What could be done with “select” here?
>>>
>>>(Sure, instead of select I can set order on the table, and copy 300 records to the temporary table, but I would like to understand what can be done here with select).
>>>
>>>Thanks in advance.