Subject | Re: [IBO] locate question |
---|---|
Author | Jason Wharton |
Post date | 2001-02-21T05:52:50Z |
IBO should be recognizing the fact that all records are fetched into the
buffer and also that you are using a query involving grouping and
aggregates. As a result it should NOT be generating that extra query.
Please tell me the version of IBO you are using and if it is current I would
very much like to see a sample of this behavior in a demonstration app.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
buffer and also that you are using a query involving grouping and
aggregates. As a result it should NOT be generating that extra query.
Please tell me the version of IBO you are using and if it is current I would
very much like to see a sample of this behavior in a demonstration app.
Thanks,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "Kjeld Loozen" <kjeld@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, February 20, 2001 10:09 AM
Subject: [IBO] locate question
> Hello all,
>
> I´ve this IB_Query:
>
> SELECT PRODCODE, ACTCODE, DISC_CODE, SUM(1) AS SUMAANTAL, SUM(DUUR) AS
> SUMDUUR
> FROM ACT
> GROUP BY PRODCODE, ACTCODE, DISC_CODE
> ORDER BY PRODCODE, ACTCODE
>
> This query aggregates thousands of records into ± 40, due to the sum
> fucntion.
> I set the autofetchall property to true.
>
> In my App, I have to locate a perticular record of that query.
> I use: IB_Query.locate('PRODCODE;ACTCODE',prod,act,[])
>
> My problem is, that this locate makes IBO generate a new query, like:
> SELECT PRODCODE, ACTCODE, DISC_CODE
> FROM ACT
> GROUP BY PRODCODE, ACTCODE, DISC_CODE
> (brilliant, this IB_monitor, btw!)
>
> This query is executed every time a do this locate.
> This realy slows down the app. I wrote a similar routine with the BDE some
> time ago, and it didn't fire a separate query each time the locate was
> executed.
>
> Why does this happen?
> Is there a way around, so that the locate seeks his results in memory?
>
> Regards,
> Kjeld