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 12:16:45
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Which is faster: Seek() or eof() in this case
Divers
Thread ID:
00898584
Message ID:
00898584
Vues:
49
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
ramil
~~ learning to stand still
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform