> The custom plan is *more expensive*; You compare costs of custom vs generic plans. I suggest: do not compare costs *at all*.
>I don't know, it's your proposal :-) But it looks like I misunderstood. It is not. My suggestion is: build a generic plan (that is the plan that will return proper result for every possible bind value), yet refer to the values of 6th binds when estimating cardinalitites. Is it clear now? Vladimir -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers