>That still won't use the indeces on the table. VFP can't know what the top N are until the sort, which happens after the data has been selected... at least in this case. If you have a FOR statement on a single table then perhaps an index could be used, but IMO, it's very unlikely.
>
>>Check Message ID:
1362696Why it can not take top 100 records from the Index and then grab corresponding records? I don't know VFP internals, so I don't know if TOP is optimized or not.
In SQL Server Index can be used for ORDER BY.
If it's not broken, fix it until it is.
My Blog