Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which is faster: Seek() or eof() in this case
Message
De
27/04/2004 13:34:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/04/2004 12:16:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00898584
Message ID:
00898619
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all,
>
>I can do some benchmarks on this but if there is a general idea as to which one is faster in this scenario:
>
>
>* scene1:
>select fktable
>go top
>scan while !eof()
>  replace fktable.fkdata1 with iif(seek(fktable.fkid, 'pktable', 'pkid'), pktable.pkdata1, "")
>  replace fktable.fkdata2 with iif(seek(fktable.fkid, 'pktable', 'pkid'), pktable.pkdata2, "")
>endscan
>
>* scene2
>select fktable
>go top
>scan while !eof()
>  seek(fktable.fkid, 'pktable', 'pkid')
>  replace fktable.fkdata1 with iif(eof('pktable'), "", pktable.pkdata1)
>  replace fktable.fkdata2 with iif(eof('pktable'), "", pktable.pkdata2)
>endscan
>
* scene3:
select fktable
replace all fkdata1 with ;
  iif(seek(fktable.fkid, 'pktable', 'pkid'), pktable.pkdata1, ""), ;
  fkdata2 with pktable.pkdata2
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform