Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SEEK(),INDEXSEEK() or KeyMatch() or SELECT-SQL?
Message
From
13/04/2005 14:43:57
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01002645
Message ID:
01004312
Views:
46
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform