Re: BUG #12933: Custom prepared plan vs partitioning.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: maxim(dot)boguk(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12933: Custom prepared plan vs partitioning.
Date: 2015-03-31 18:25:37
Message-ID: 23074.1427826337@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

maxim(dot)boguk(at)gmail(dot)com writes:
> I found case when custom plans with partitioning shows strange behavior.
> First 5 repetitions of execute with the same parameters I getting fast
> custom plan, on 6th run plan switch to slow generic (all-partitions)
> version.

This behavior is expected; after half a dozen trials the plancache will
decide it's not getting enough win from custom plans to justify replanning
every time. For a cost delta of about 0.6 unit I would have to agree with
it. You may have a real case where it's doing something wrong, but this
toy example doesn't demonstrate a bug IMO.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2015-03-31 23:09:28 Re: BUG #12904: Installation postgres fails when Windows user name contains spaces
Previous Message Rob Ward 2015-03-31 17:32:48 Re: BUG #12908: tstzrange constructor fails when used in WHERE clause