Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rushmore Vs. Explicit Indexes
Message
 
À
07/04/2000 12:50:37
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00356603
Message ID:
00357052
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform