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

2018-10-28 Thread Justin Pryzby
On Fri, Oct 26, 2018 at 10:45:40AM -0500, Justin Pryzby wrote: > 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

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, pruni

DELETE / UPDATE from partition not optimized (11.0)

2018-10-26 Thread Dave E Martin
If SELECT is confident enough to limit itself to one partition, why isn't DELETE (or UPDATE)? Also, I note in the query plan shown below it thinks the rows in the irrelevant partitions is something other than 0, which is impossible. (presumably, SELECT correctly determined this, and eliminated the