Subject Re: [IBO] SQL plan in TIBOQuery
Author Jason Wharton
The Plan property could just be to get the optimizer plan being used for the
prepared statement rather than a way to provide a hard-coded plan for the
optimizer upon preparing the statement.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: "Raymond Kennington" <progsol@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, February 03, 2003 11:42 AM
Subject: Re: [IBO] SQL plan in TIBOQuery


> "hubert_krukowski " wrote:
> >
> > > When you change the query for the grid by changing the order for
> > sorting, first
> > > prepare it and then use the IB_Query.SQLPlan property to provide
> > your own. (I
> > > haven't tried this, just read the Help file.)
> >
> > SQLPlan is available in IB_Query but not in IBOQuery I am using. I
> > have to use IBOQuery as it is a TDataset descendant and I do not
> > have to modify all the visual controls in the app.
> >
> > > Another thing you can do is anticipate all the possible orders and
> > provide
> > > indexes for them so that the optimiser has something better to
> > choose from.
> >
> > I do have correct indexes. I even know the correct plan for the
> > sorting in question. The problem is Interbase optimizer does know
> > it :-)
>
> (I think Firebird's optimiser has been improved significantly, but that
won't
> help you unless you switch.)
>
> IBOQuery has the property Plan, instead of SQLPlan.
>
> There is also an event OnPrepare... that might be useful to you. I don't
know if
> it has finished preparing or is fired after preparing (as the Help file
doesn't
> state this info).
> --
> Raymond Kennington
> Programming Solutions
> W2W Team B