Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speeding up search - Locate For or Seek?
Message
De
27/07/2000 13:59:10
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00397065
Message ID:
00397753
Vues:
42
Hi George,

Your tests may be unreliable because the physical record location of the GREIGE_NO = '439D' might affect your results. If you would use random values to test on, you might get more reliable results.

Walter,

>>Hey George, I've tried to duplicate your results, but I cannot. With the tag set I'm getting 36 seconds and without it I get .29 seconds. This has always been my experience. There was even a time when it was recommended that you SET ORDER TO 0 before running an SQL, but that's not necessary anymore. Here's how I created my table and how I tested the performance ... I hope I got the UT code formating stuff right.
>
>
>You got me, I have no idea. Here's mine
>SET ORDER TO TAG GREIGE_NO
>lnstart = SECONDS()
>FOR lni = 1 TO 10000
>  SEEK '439D'
>NEXT
>lnstop = SECONDS() && less than 0.2 seconds
>GO TOP
>? lnstop - lnstart
>SET ORDER TO
>lnstart = SECONDS()
>FOR lni = 1 TO 10000
>  LOCATE FOR GREIGE_NO = '439D'
>NEXT
>lnstop = SECONDS()
>? lnstop - lnstart && approx. 6.15 seconds
>GO TOP
>SET ORDER TO TAG GREIGE_NO
>lnstart = SECONDS()
>FOR lni = 1 TO 10000
>  LOCATE FOR GREIGE_NO = '439D'
>NEXT
>lnstop = SECONDS()
>? lnstop - lnstart && approx. 2.2 seconds
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform