Subject | Re: [IBO] Which is the best method? |
---|---|
Author | Raymond Kennington |
Post date | 2002-11-12T04:58:36Z |
Marco Menardi wrote:
When a PLAN is specified there is no analysis necessary to analyse which PLAN to use. This
was absolutely crucial to one of my clients with much anger and frustration at the
computer (Pentium 75, NT 3.51 server) taking sometimes longer than 2 seconds just to work
out the PLAN. Maybe not necessary on faster computers, but still noticeable.
If the only change is to parameters then there was no need to close or unprepare or
prepare again when using TDatabase and BDE. Maybe still true with IBO.
--
Raymond Kennington
Programming Solutions
W2W Team B
>One thing that others will tell you definately *not* to do is specify the PLAN.
> What is the best method to minimize overhead by the server when I want
> to execute a ib_query again, but with new parameters (in BeforeOpen
> event) and new "where" criteria (in PrepareSQL)?
> I've tested that theese works (in the sense that PrepareSQL and
> BeforeOpen events are executed, and the right dataset is returned):
> (Second time here, so the query is still open)
> a) Close; InvalidateSQL
> b) Close; Unprepare;
> c) Unprepare;
> if Active then Refresh else Open
> which is better? a), b) or c)? Another one?
>
> Thanks
> Marco Menardi
When a PLAN is specified there is no analysis necessary to analyse which PLAN to use. This
was absolutely crucial to one of my clients with much anger and frustration at the
computer (Pentium 75, NT 3.51 server) taking sometimes longer than 2 seconds just to work
out the PLAN. Maybe not necessary on faster computers, but still noticeable.
If the only change is to parameters then there was no need to close or unprepare or
prepare again when using TDatabase and BDE. Maybe still true with IBO.
--
Raymond Kennington
Programming Solutions
W2W Team B