Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speeding up a query
Message
From
04/10/2001 14:03:52
 
 
To
04/10/2001 13:59:24
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:
00564349
Views:
12
>Is there a way to improve the speed of this query?
>
>SELECT *
>FROM tablename ;
>WHERE RECNO() >= lnrecno ;
>INTO CURSOR mycursor
>
>I am trying to select the last X number of records from a table, but as the table grows, this SELECT statement slows down. Is there a way of improving the speed or another way to select just the last X number of records from a table?
>
>Thanks
>
>Jerryt

If you create an index on recno(), it think Rushmore can kick in (I'm not sure, though).

However, it may be better to have a surrogate primary key field that you do this against.
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform