Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speeding up a query
Message
From
04/10/2001 16:57:04
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00564341
Message ID:
00564516
Views:
17
What I ended up doing for now is:

*Create a cursor.
SELECT mytable
lnrecno = RECCOUNT() - 100
GO lnrecno
SCAN REST
SCATTER MEMVAR
* INSERT INTO mycursor FROM MEMVAR
ENDSCAN

This greatly improved the speed of getting the last X number of records. The table I am querying contains over a million records. Indexing on RECNO() is the real answer but I cannot take the time to do this now.



>I know there is something else that can be done, if I think of it I will post it
>
>
>>Thanks for the help, I was trying to avoid indexing on recno() but it sounds like I'll have to.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform