Re: Gained %20 performance after disabling bitmapscan

2018-10-26 Thread Jeff Janes
On Mon, Oct 22, 2018 at 3:20 AM Yavuz Selim Sertoglu <
yavuzselim.serto...@medyasoft.com.tr> wrote:

> Thanks for the reply Jeff,
>
> I know 20ms is nothing but it shows me that there is a problem with my
> configuration. I want to find it.
>

This is a dangerous assumption.  This is no configuration you can come up
with which will cause the planner to be within 20% of perfection in all
cases.  Given the other plans you've shown and discussed, I think this is
just chasing our own tail.

Cheers,

Jeff

>


Re: DELETE / UPDATE from partition not optimized (11.0)

2018-10-26 Thread Justin Pryzby
On Thu, Oct 25, 2018 at 10:43:10AM -0600, Dave E Martin wrote:
> If SELECT is confident enough to limit itself to one partition, why isn't
> DELETE (or UPDATE)?

Because of this limitation:

https://www.postgresql.org/docs/current/static/ddl-partitioning.html#DDL-PARTITION-PRUNING
|Currently, pruning of partitions during the planning of an UPDATE or DELETE
|command is implemented using the constraint exclusion method (however, it is
|controlled by the enable_partition_pruning rather than constraint_exclusion) —
|see the following section for details and caveats that apply.

Justin