Subject | Re: [Firebird-Architect] "Adapted" PLAN for parametrized LIKE queries |
---|---|
Author | Dmitry Yemanov |
Post date | 2012-03-14T13:11:50Z |
14.03.2012 14:26, Alex Peshkoff wrote:
case) is made conditional.
joins etc, especially if the predicate is a part of the relationship
condition. We cannot estimate the cost properly at the prepare time. Of
course we could suppose the worst case or use some average cost, but
it's still something sub-optimal. More brainstorming is required here.
Dmitry
> What if there are >1 places in the query where execution plan canThe latter of course. Only a small subset (single table access in our
> 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?
case) is made conditional.
> But looks like in the worst caseThis could be a problem if such conditional retrievals are used inside
> all plan can change depending upon use or not index in one place.
joins etc, especially if the predicate is a part of the relationship
condition. We cannot estimate the cost properly at the prepare time. Of
course we could suppose the worst case or use some average cost, but
it's still something sub-optimal. More brainstorming is required here.
Dmitry