Subject Re: Repost - Size of Optimizer Block exceeded
Author csswa
Francis, the only documented (web-searched) instance of this error
follows. Unless your code (or that underlying the IBO
implementation) generates such a long string of ANDs/ORs then you can
pretty much rule this out. Possibly this bug has been fixed in FB
anyway?

Regards,
Andrew Ferguson
-- Andrew is the answer. I forgot the question.

-----

WHERE clause with greater than 256 ANDs or ORs generates size of
optimizer block exceeded error - by Borland Developer Support Staff

Abstract:This error can occur on a SELECT or UPDATE statement
Q. What can cause the error Size of optimizer block exceeded?

A. This error occurs when the WHERE clause of an UPDATE or SELECT has
greater than 256 ANDs or ORs.

A common cause for having an UPDATE statement that includes every
field in a table occurs when using a TTable or TQuery with Delphi or
C++ Builder and the UpdateMode property is set to UpWhereAll.
Changing the UpdateMode to upWhereChanged or upWhereKeyOnly solves
the problem for most applications. If you need further
customizations, a TUpdateSQL component can be used in conjunction
with your TQuery or TTable to further control which fields are used
in the WHERE clause of your UPDATE statement.



--- In ib-support@y..., "moorefg" <moorefg@n...> wrote:
> Can anyone help?
>
> I am getting the above message in my application. I'm not sure what
> to look for and will be happy to give further relevant information
if
> I know where to look.
>
> The application is failing after a scanning only 125 records and
> populating an additional field by referencing through a library
> procedure that queries a table in another database using a three
> field match. The query table is not large - 600 records or so.
>
> There is a severe degradation in speed towards the end so it seems
> that there is a memory implication. The query routine table is
> closed after each call.
>
> I'm not sure that it is relevant but I'm using IB Objects -
> IB_Query's.
>
> How can I increase the size of the Optimizer Block or what
mitigating
> steps can I take to prevent such an occurrence.
>
> Francis Moore