Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed of SKIP
Message
De
02/11/2001 17:45:57
 
 
À
02/11/2001 02:56:38
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00576573
Message ID:
00577037
Vues:
16
Interesting results.

Across a WAN, however, SKIP is horrible. In sone circumstances GO is much better, though slightly less flexible.

Thus SKIP 50 can take a minute on a WAN, whereas GO RecNo()+50 is almost instantaneous.

Downsides: GO does not ignore deleted records, and assumes no active index.

**--** Steve

>Hi Jimi,
>
>First, I think "skip 50" would be faster because it just moves the record pointer. It means nothing to foxpro no matter it's indexed or not.
>And it has to execute 50 commands on the second method.
>
>However, I've tested it with a 400000 records table. The result is:
>
>Method Time required
>1. SKIP 400000 1.532
>
>2. 15000 SKIP commands 0.050 (VFP can't accept 400000 lines in a program)
>
>3. Call 26 times of a 15000 1.522
> SKIP commands program
>
>4. For loop 1.652
>
>Next, I tested it again with a 400000 records table but only one field inside. The table used in the previous test is a very big file. And the result is:
>
>1. SKIP 400000 0.251
>2. Call 26 times 0.351
> of a program with
> 15000 skip commands
>3. For loop 0.411
>
>
>In conclusion, I think it somehow depends on the file size. When it moves the pointer in a big file it will be affected by the disk I/O, buffer, memory, OS...
>
>Any way, in fact, there's no different with record number below 10000 (in my PC).
>
>It's quite interesting. Looking forward for other folks' reply la.
>>
>hi all,
>>
>>Just wonder, for an indexed table:
>>
>>SKIP 50
>>
>>SKIP
>>SKIP
>>SKIP
>>...
>>SKIP (50 times)
>>
>>Does SKIP 50 a lot faster or just similar?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform