Subject | Re: [IBO] Performance of Locate |
---|---|
Author | Jason Wharton |
Post date | 2001-10-11T18:50:31Z |
I need a sample application in order to investigate what is going on here.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: <rvellacott@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, October 11, 2001 5:30 AM
Subject: [IBO] Performance of Locate
> I am getting some funny performance issues with Locate.
>
> I open an IBOQuery in a VCL DBgrid, with about 2500 records.
> AutoFetchAll and FetchWholeRows are set to false.
>
> Running the following three commands consecutively works just fine,
> with good performance..
>
> MyQuery.Locate('ITEM_NO','A',[loPartialKey,loCaseInsensitive]);
> MyQuery.Locate('ITEM_NO','Z',[loPartialKey,loCaseInsensitive]);
> MyQuery.Locate('ITEM_NO','A',[loPartialKey,loCaseInsensitive]);
>
> But then I try going back to Z.
>
> MyQuery.Locate('ITEM_NO','Z',[loPartialKey,loCaseInsensitive]);
>
> and this time it takes 20 - 30 seconds.
>
> If I call MyQuery.RefreshKeys before each time before I call Locate,
> it performs fine.
>
> So what is happening here? Is it necessary to call RefreshKeys, or is
> there a better way?