Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 6 Jahren, 5 Monaten
Letzter Beitrag:
vor 6 Jahren, 5 Monaten
Beteiligte Autoren:
Droogans.pcs.crosspost, Jimbo, Riebens.pcs.crosspost, Paulo Oliveira

HReadSeekFirst vs. HReadSeek: Which is Faster?

Startbeitrag von Droogans.pcs.crosspost am 21.12.2011 13:18


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?

Message forwarded from pcsoft.us.windev

Antworten:

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

Message forwarded from pcsoft.us.windev

von Riebens.pcs.crosspost - am 21.12.2011 14:56
from the help of the hreadseek function.
Notes:
By default, HReadSeekFirst and HReadSeekLast are used to perform exact-match searches.
By default, HReadSeek is used to perform a generic search on the character strings. This search is not a generic search on the integers, the reals, the dates, the currencies, ...

http://doc.windev.com/en-US/?3044050&name=hreadseek-function



von Paulo Oliveira - am 21.12.2011 15:58

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.

Message forwarded from pcsoft.us.windev

von Droogans.pcs.crosspost - am 21.12.2011 16:10
Quote
Droogans.pcs.crosspost
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.

Message forwarded from pcsoft.us.windev


Hi, this is a big misunderstanding of how relational files are built and used! HReadSeek / HReadSeekFirst etc basically are NOT queries (they could be translated into queries if used on non-HF files by means of ODBC). In HFCS / HF Classic they simply move the file pointer to the appropriate record and, as their name says, read this record's content into the file's buffer. Moving the file pointer is done on basis of the index file which is searched for the correct key value (HReadSeekFirst) OR the same or the next higher key value as in HReadSeek. Means, there's no way to issue a HReadSeek command without supplying the key item (see analysis) to be searched and the key value you're searching for. You can even move the file pointer without reading the record as in HSeek. Here, just as for the HRead.. commands, the important part is the result of the operation! Look into the Help system and carefully read .. RTFM ! Regards, Guenter


von Jimbo - am 22.12.2011 07:16
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.