Subject | Re: [Firebird-Architect] "Adapted" PLAN for parametrized LIKE queries |
---|---|
Author | Alex Peshkoff |
Post date | 2012-03-14T10:26:22Z |
On 03/14/12 14:17, Thomas Steinmaurer wrote:
differ? Looks like we get exponential growth of memory used for such
prepared queries if we duplicate all plan. Or may be we talk about
having a kind of "if" inside the plan? But looks like in the worst case
all plan can change depending upon use or not index in one place.
>> Another solution I can think of is to prepare this particular retrievalWhat if there are >1 places in the query where execution plan can
>> with two different access paths (NATURAL and INDEX) and choose between
>> them at runtime based on the parameter value.
> Sounds good. Again. Only for those kind of statements, where an
> execution plan could differ for already known parameter values.
>
differ? Looks like we get exponential growth of memory used for such
prepared queries if we duplicate all plan. Or may be we talk about
having a kind of "if" inside the plan? But looks like in the worst case
all plan can change depending upon use or not index in one place.