SV: force partition pruning - Mailing list pgsql-general

From Niels Jespersen
Subject SV: force partition pruning
Date
Msg-id 85050e6bba554ef5b4648b0a72c46baa@dst.dk
Whole thread Raw
In response to Re: force partition pruning  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: force partition pruning
List pgsql-general
Fra: David Rowley <dgrowleyml@gmail.com> Sendt: 12. maj 2021 02:34

>>
>> ok i think i just may be there is very less data , hence no index scan, no pruning.
>>
>> when i try to force seq_scan off,
>>
>
>Unfortunately, no run-time pruning occurred in the above plan.  
>
>The fact that the above plan uses Append made that possible.
>
>I think, for now, the only sure way to get run-time pruning working for this case is to run two separate queries so
thatthe 2nd one can
 
>perform plan-time pruning.   

This is the conclusion I'm taking from this thread and will base my further work on. I was the one asking the original
question.A table returning function is my work-hypothesis for now. 
 

>
>
>I think if you try to make this work by trying to force the planner's hand, you'll just feel pain when the planner one
dayhas a change of heart and decides to swap the join order on you.
 
>
>David
>
Thank you for the insights into the planner capabilities. 

Regards Niels

pgsql-general by date:

Previous
From: David Rowley
Date:
Subject: Re: force partition pruning
Next
From: Tom Lane
Date:
Subject: Re: ERROR: no known snapshots