Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
10 Things to Avoid in VFP Development
Message
From
01/01/2000 17:08:44
 
 
To
01/01/2000 16:34:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00310318
Message ID:
00311234
Views:
28
Hi Jeff,

You're confident, I'll give you that. But why can't you use seek()? I have a table with 100,000 records, an integer field that basically equals the record number, and an index on that field. When I do:

clear
go top

*Find early record using SQL
ns = seconds()
select number from sqlspeed where number = 1 into cursor temp
?seconds() -ns
USE
SELECT 1
goto top

*Find early record using SEEK()
ns = seconds()
=seek(1, 'sqlspeed', 'number')
?seconds() - ns
goto top

*Find late record using SQL
ns = seconds()
select number from sqlspeed where number = 99999 into cursor temp
?seconds() -ns
USE
SELECT 1
goto top

*Find early record using SEEK()
ns = seconds()
=seek(99999, 'sqlspeed', 'number')
?seconds() - ns
goto top


and after about 20 times, I notice a trend in the output kindof looks like:

0.035
0.001
0.006
0.000


I don't think your answer to Ed's question is very complete (Lol!), are you avoiding it?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform