On Mon, Nov 21, 2011 at 2:14 PM, Sytze de Boer <[email protected]> wrote: > Hello foxers > Probably a dumb question but I'll risk it > > If I have a large history file indexed on a number (9) fields > e.g. CLIENT, STOCKCODE etc > > If I issue command SELECT FLD1, FLD2, FLD3, FROM MYTABLE etc, does it > matter which ORDER is set if I want a range of clients, or a range of stock > codes. > i..e should I issue a line that says SET ORDER TO 1 or 2 or 3 > --------------------
If the joining index can support the order by as well it might be used figuring that it is a compound index . In VFP not sure if you can accomplish that like you can in other RDBS. So probably not. Order by is complicated because it is assumed to be secondary to the select because it is only working on the returned data set which never has an index. If there are no joins then the index used must "match" the the order by criterion. -- Stephen Russell 901.246-0159 cell _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAJidMYL4HrQgvrd9xMenOPdQLcykV=k_vm2awjqa+ody+si...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

