>Hi,
>I did some testing a couple of weeks ago checking all the VFP9 changes and their effects on SQL to see if any differences.
>The test dbf had 10 Million records, I randomly inserted 100 records thru it and deleted 100,000 records for the test.
>
>The following SQL executed in 0.05sec once I got it Fully optimized.
>
>
>SELECT RECNO() AS RP, * FROM invh WHERE ALLTRIM(BATCHNO)="2000" ORDER BY lastname, firstname INTO CURSOR aa nofilter
>
Do you have an index on ALLTRIM(BATCHNO)? I think we should avoid ALLTRIM in index expressions like plague.
If it's not broken, fix it until it is.
My Blog