Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speeding up search - Locate For or Seek?
Message
De
26/07/2000 14:50:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00397065
Message ID:
00397229
Vues:
41
Geo,

Is Rushmore smart enough to re-use the bitmap from your first LOCATE when it does the second LOCATE? Since you're not closing the table in between... maybe?

>>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
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform