VS>>Why doesn't backend reuse already existing good plan? PS>this logic is driven by plan cost, not by plan execution time.
It do understand that currently PG replans with $1, $2 and uses default selectivities for that. What I am asking is to make PG aware of "previously used bind values", so it would calculate proper selectivities for $1, $2. PS. It is not the first time the problem bites me, so I hand-crafted a testcase. Vladimir -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers