On 29/10/06 04:40, in article
1162096829.899697.42580@[EMAIL PROTECTED]
"pangsscn@[EMAIL PROTECTED]
"
<pangsscn@[EMAIL PROTECTED]
> wrote:
> Now I am useing codebase to query a large DBF. more than half millions
> record.
> Please see my code:
>
> Code4 codeBase;
> Data4 poidata;
> Relate4set relation;
> poidata.open(codeBase,ch);
> relation.init(poidata);
> relation.queryset("UPPER(PinYin) = 'ABC'");
> relation.orderset("PinYin");
>
> //here:How can I fast count the result set?
> //I just can use "for" to count,but it's so slow...
> count = ??
>
> //here:How can I fast get the recordNO list ?
> //or How can I put the result list to a Data4 type variable?
> //or, another good way?
>
> I have thought them 2 days...anyone can hele me ?
> Thanks
>
If you only working on one DBF, and you want to do this frequently, it's
quicker with Tags/index. Once the tag has been created the tag expression
UPPER(PinYin) (which is done only once), you can use seek. Even if you
need
to query more than one dbf, you will speed up the search substantially if
the tables are indexed appropriately.
Regards
Andy


|