Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SEEK(),INDEXSEEK() or KeyMatch() or SELECT-SQL?
Message
De
13/04/2005 14:43:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01002645
Message ID:
01004312
Vues:
39
>I'm just going to believe you then... If I find a book, which describes it, I'll read it up, of course.
DON'T! Remember the m.dot ;-)
clea
LOCAL lux, lcStr, lcVgl, llErg, ;
lnAsc, lnVgl, lnCount, lnStart, lnRun, lnX
lcStr = "x"
lcVgl = "V"
lnAsc = ASC(m.lcStr)
lnVgl = ASC(m.lcVgl)
lnCount = 1000000

FOR lnx = 1 TO 5
	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
	NEXT
	= timeIt(m.lnStart)

	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
		= m.lcStr == m.lcVgl
	NEXT
	= timeIt(m.lnStart)

	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
		= m.lnAsc = m.lnVgl
	NEXT
	= timeIt(m.lnStart)

	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
		lux = m.lcStr
	NEXT
	= timeIt(m.lnStart)

	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
		luX = m.lnAsc 
	NEXT
	= timeIt(m.lnStart)

	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
		= partst(m.lcStr)
	NEXT
	= timeIt(m.lnStart)

	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
		= partst(m.lnAsc)
	NEXT
	= timeIt(m.lnStart)

	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
		= partst7(m.lcStr, m.lcStr, m.lcStr, m.lcStr, m.lcStr, m.lcStr, m.lcStr)
	NEXT
	= timeIt(m.lnStart)

	lnStart = SECONDS()
	FOR lnRun = 1 TO m.lnCount
		= partst7(m.lnAsc, m.lnAsc, m.lnAsc, m.lnAsc, m.lnAsc, m.lnAsc, m.lnAsc)
	NEXT
	= timeIt(m.lnStart)
	?
NEXT


FUNCTION partst(tux)
FUNCTION partst7(tux1,tux2,tux3,tux4,tux5,tux6,tux7)
FUNCTION timeit(tnStart)
?? STR((SECONDS()-m.tnStart)*1000)
>Well, for my tests I can run them with tables opened and without.
Good start.

regards

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform