Oops, just noticed the replies in my Profox[OT] folder! > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of NickC > Sent: 06 September 2008 12:09 > To: 'ProFox Email List' > Subject: RE: SQL > not optimised > > So nobody has any suggestions? > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf > > Of Nick Causton > > Sent: 04 September 2008 20:43 > > To: 'ProFox Email List' > > Subject: SQL > not optimised > > > > Hi all, > > > > I have a problem with an app which retrieves from a table of over 100k > > records, this is happening via ASP with ADO so it can only be done using > > SQL. > > > > There is an OrderNo field which is indexed and to move through the > records > > I > > am using: > > > > * Next > > SELECT TOP 1 * FROM Orders WHERE Orders.OrderNo > (clastOrderNumber) > ORDER > > BY OrderNo DESC > > > > * Prev > > SELECT TOP 1 * FROM Orders WHERE Orders.OrderNo < (clastOrderNumber) > ORDER > > BY OrderNo ASC > > > > Problem is VFP does not use the index for this and retrieving the > > next/previous record takes nearly a minute when it is running over the > > network. > > > > Any suggestions how to get around this? > > > > > > [excessive quoting removed by server]
_______________________________________________ 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/!&[EMAIL PROTECTED] ** 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.

