main logo
Subject: RE: is this a fair test? (SCAN vs DO WHILE)
Author: "Wilson M. Kierstead"
Posted: 2003/01/31 23:43:00
 
View Entire Thread
New Search


>FYI. It's a fairer test to use a table and close and reopen the table
>between tests.

I agree Chet. I didn't mean to imply that the samples below were in the
same code.

Wilson

-----Original Message-----
From: profox-admin AT leafe .D.O.T com [mailto:profox-admin@leafe.com]On Behalf Of
Chet Gardiner
Sent: Friday, January 31, 2003 6:27 PM
To: profox AT leafe .D.O.T com
Subject: Re: is this a fair test? (SCAN vs DO WHILE)


FYI. It's a fairer test to use a table and close and reopen the table
between tests.

----- Original Message -----
From: <profox@cpvfug.org>
To: <profox AT leafe .D.O.T com>
Sent: Friday, January 31, 2003 3:08 PM
Subject: RE: is this a fair test? (SCAN vs DO WHILE)


> Wilson,
>
> I looked at your code, and that seems to me as to what I did? Now the
example of 3 nested DO WHILEs was different of course because in that case I
also took advantage of indexes and added the FOR clause on the SCAN loop to
be optimizable.
>
> --Michael
> ------------------------------------------------
> On Fri, 31 Jan 2003 14:12:31 -0500, "Wilson M. Kierstead"
<wil@vfpbizapps.com> wrote:
>
> <snipped>
> > Therefore, an apples to apples test would be as follows:
> >
> > * Test While loop -Start
> > SELECT table
> > ltstart = datetime()
> > GO TOP
> > do while !EOF()
> > skip
> > enddo
> > ? datetime() - ltstart && show number of seconds taken to skip through
> > entire table
> > * Test While loop -End
> >
> > * Test Scan loop -Start
> > SELECT table
> > ltstart = datetime()
> > SCAN
> > ENDSCAN
> > ? datetime() - ltstart && show number of seconds taken to skip through
> > entire table
> > * Test Scan loop -End
> >
> > Wilson KIerstead
>
>
[excessive quoting removed by server]



 
©2003 Wilson M. Kierstead
<-- Prior Message New Search Next Message -->