>Anyway, I wrote a program a while back that opened a table and did a completely Rushmore optimized search over a network. The table had about 10 million records in it. The code was using SET ORDER TO early on (for display) and then later called a fully Rushmore optimized SQL statement. This SQL statement took FOREVER (like an hour). I thought that was strange, and after some investigation found that it was searching the records sequentially and hauling all the data over the network.
>Anyone know of where this might be documented, and why it's that way?
I don't believe you <s>. I think something else is going on. A SQL opens the tables involved AGAIN, so it's not clear to me why it would be affected by the order. Having said that, I know that in general, there is a penality for having an order set, but I have always measured it as very slight, not the huge one you are experiencing. Could you test again with a simple test?
LPARAMETER SetOrder
IF m.SetOrder
SET ORDER TO Something IN MyAlias
ELSE
SELECT MyAlias
SET ORDER TO
ENDIF
Timer = SECONDS()
SELECT * WHERE Field = Expr INTO CURSOR Temp
? IIF(m.SetOrder,"With an Order: ", "No order set: ")+ STR(SECONDS() - m.Timer, 8,4)
Charlie