Re: Should we add GUCs to allow partition pruning to be disabled? - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Should we add GUCs to allow partition pruning to be disabled?
Date
Msg-id CAKFQuwbGZ-jAO=WJ8skOahJB0OARYN0EAVTEAGzuqoh2=De6eg@mail.gmail.com
Whole thread Raw
In response to Re: Should we add GUCs to allow partition pruning to be disabled?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Should we add GUCs to allow partition pruning to be disabled?
List pgsql-hackers
On Thu, May 10, 2018 at 8:57 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
b) by default, no partitions are
scanned, and we examine the query to determine which ones must be
scanned.

​There is an element of logic that says "by default, no partitions are scanned" is not a reasonable behavior mode.  Thus an alternative analogy would be:

Bucket A is the set of all relevant partitions in the tree

Pruning: remove from bucket A those which we know we can skip; then iterate over A
Selection: choose those items from A that are possible holders of our data and process each one (place all selected items into bucket B and iterate over B if you want to perform selection in total first).

As a user I don't really need to know which model is implemented and the name doesn't necessarily imply the implementation.  Pruning seems to be the commonly-used term for this feature and we should stick with that.

David J.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)
Next
From: Alvaro Herrera
Date:
Subject: Re: Should we add GUCs to allow partition pruning to be disabled?