PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → HReadSeekFirst vs. HReadSeek: Which is Faster?
HReadSeekFirst vs. HReadSeek: Which is Faster?
Débuté par Droogans, 21 déc. 2011 16:09 - 3 réponses
Membre enregistré
25 messages
Posté le 21 décembre 2011 - 16:09
Do both of these statements give up reading the file once they've found a match, or does one require more resources than the other?
Membre enregistré
80 messages
Posté le 21 décembre 2011 - 17:39
Hi

These are different functions. Hreadseekfirst finds a specific record with an 'exact match' while Hreadfirst positions to the first record of a lot of records that matched a search item (field)

Hreadseekfirst(customer,customerkey,"mandy")

while

Hreadfirst(customer,Customerkey) positions to the first record from lowest to highest value - including duplicates on the 'customerkey' .

Hope this helps ..

Kind Regards
Membre enregistré
25 messages
Posté le 21 décembre 2011 - 18:59
Riebens wrote:

Hreadfirst(customer,Customerkey) positions to the first record from lowest to highest value - including duplicates on the 'customerkey' .


I am not interested in HReadFirst. I am interested in HReadSeek and HReadSeekFirst.

Do both of these functions perform a full table read, or does one "opt-out" once a match has been found?

Thanks.
Posté le 22 avril 2014 - 15:32
Bump.

This is a good question especially since HReadSeek with the hIdentical flag would perform the same purpose as HReadSeekFirst.

Which is faster? Which uses less memory?
Is a binary search utilized in either of them or are they just using linear searches?

If they are only using linear searching then it may be worth our time to write our own search functions using binary searching.