Subject Re: SEARCHING VERY LARGE FILE
From Ronnie MacGregor <No_Sp@m.Thanks>
Date Thu, 2 Sep 2021 19:47:36 +0100
Newsgroups dbase.getting-started

In article <IGAYdN9nXHA.1636@ip-AC1E04A7>, invalid@invalid.invalid
says...

> > I prefer waiting for 1 second before requery()
>
> Agostinho is using LIKE '%whatever%' to select records from over 1
> million records in a .dbf file.  This is a hard task for SQL and takes
> long enough without adding a delay between sending individual characters
> of the search string to the SQL engine.

Actually I use a similar approach for an intellegent search form which
with a single entryfield will try to establish the type of data that is
being searched for and query accordingly.

For example three letters from a first name and three letters from a
surname is usually enough to find a Patient, searching two fields, and
coping with the search data presented the other way around. And a while
array of other bits of data, DOB, PxID, etc. etc..

Anyway . . . .
The logic of the delay in triggering a requery is that you reduce the
number of queries being made, and allow the user to type three or four
characters before a search is initiated.

From memory, I think the delay the we settled on is around one second.