David Rowley <[email protected]> writes:
> On Thu, 24 Jun 2021 at 10:38, Tom Lane <[email protected]> wrote:
>> I strongly disagree.  That's essentially betting the whole farm on
>> our always being able to optimize parent-level operations fully,
>> which I do not think we are anywhere close to.

> Did you have anything in particular in mind here?

I don't think it's very hard to make up WHERE conditions that a person can
see select only one partition, but PG won't be able to figure that out.

> But... maybe there are some cases where a user can be certain that all
> interesting records are contained in a single partition but
> partitioning pruning cannot prove it...So maybe what you say is right.
> The workaround there would be to add a qual that allows pruning to
> work.

[ shrug... ]  It's about as easy to just name the partition you want.
When planning overhead is considered, maybe it's a lot easier.

                        regards, tom lane


Reply via email to