Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore Vs. Explicit Indexes
Message
 
To
07/04/2000 12:50:37
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00356603
Message ID:
00357052
Views:
14
Hi Walter,

What I mean is this:
Clear All
Close All
Release All

Create Cursor Bench (nField N(2))
For t=0 to 99
	Insert into Bench Value (m.t)
Endfor
Index On nField Tag nField

Set Talk off
Set Notify off

Set Optimize On
DoTest()
Set Optimize Off
DoTest()

Procedure DoTest
	Local lnStart, lnCount
	lnStart = Seconds()
	For lnCount=1 to 50000
		Locate for nField = 50
	Endfor
	? Seconds() - m.lnStart
EndProc
The optimized version is constantly between 10% and 20% faster than the non-optimized LOCATE. Since this is a cursor, all the possible conflicts that force VFP to reread the index nodes can't occur.

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform