Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speeding up search - Locate For or Seek?
Message
 
À
26/07/2000 14:26:54
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00397065
Message ID:
00397223
Vues:
33
>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
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform