On Tue, 30 Sept 2025 at 02:49, Lauro Ojeda wrote:
> By looking into it, I have the impression there is a bug in the costing sum
> in that situation, where the cost of the "never executed" partitions should
> be deducted from the final cost estimation, which would make pruning to be
> the prefer
Hi David,
Thank you for your nice reply.
I have the impression there is something heavily penalizing the usage of
partition pruning. While trying to go a bit further, I realized that
partition pruning is not occurring because the planner gives the cost of
seq-scanning all partitions to just over 2
On Mon, 29 Sept 2025 at 17:55, Lauro Ojeda wrote:
> Hi David,
> Thank you for your nice reply.
>
> I have the impression there is something heavily penalizing the usage of
> partition pruning. While trying to go a bit further, I realized that
> partition pruning is not occurring because the plann
On Fri, 26 Sept 2025 at 07:49, Lauro Ojeda wrote:
> The only way I found to make pruning work is to force index_scan using
> pg_hint_plan, but I wanted to influence the planner to decide it by itself
> rather than relying on hints. What's the reason for this misbehaving and what
> could I do to
Never mind my message. I misread it and missed the plan with no hints.
Michał
> On 25 Sep 2025, at 22:10, Michał Kłeczek wrote:
>
>
> Hi,
>
> Partition pruning is happening: pruned nodes are marked as “never executed”.
> It is just that pruning is performed not by the planner but by the ex
Hi,
Partition pruning is happening: pruned nodes are marked as “never executed”.
It is just that pruning is performed not by the planner but by the executor in
this case.
—
Michał
> On 25 Sep 2025, at 21:49, Lauro Ojeda wrote:
>
>
> Hi super-experts,
> I am trying to solve a mystery for a
I managed to get a plan I was hoping for, but it still doesn't prune
partitions. I created a new operator #|<(integer[], integer) that is
defined in SQL and is basically equivalent to value=ANY(array), and a
non-stable tenants() function defined that returns an array from the
setting, and with that
[email protected]
Subject: Re: partition pruning only works for select but update
Justin Pryzby writes:
> On Fri, Jul 01, 2022 at 08:30:40AM +, James Pang (chaolpan) wrote:
>> We have other application depend on V13, possible to backport code
>> changes to V13 as
>> ht
Justin Pryzby writes:
> On Fri, Jul 01, 2022 at 08:30:40AM +, James Pang (chaolpan) wrote:
>> We have other application depend on V13, possible to backport code changes
>> to V13 as
>> https://git.postgresql.org/gitweb/?p=postgresql.git;a=patch;h=86dc90056dfdbd9d1b891718d2e5614e3e432f35
> I
> Sent: Tuesday, June 28, 2022 9:30 PM
> To: James Pang (chaolpan)
> Cc: [email protected]
> Subject: Re: partition pruning only works for select but update
>
> "James Pang (chaolpan)" writes:
> > But when
> > Explain update tab
Pang (chaolpan)
Cc: [email protected]
Subject: Re: partition pruning only works for select but update
"James Pang (chaolpan)" writes:
> But when
> Explain update table set .. where partitionkey between to_timestamp() and
> to_timestamp();
>
Pang (chaolpan)
Cc: [email protected]
Subject: Re: partition pruning only works for select but update
"James Pang (chaolpan)" writes:
> But when
> Explain update table set .. where partitionkey between to_timestamp() and
> to_timestamp();
> It still
"James Pang (chaolpan)" writes:
> But when
> Explain update table set .. where partitionkey between to_timestamp() and
> to_timestamp();
> It still show all of partitions with update ...
In releases before v14, partition pruning is far stupider for UPDATE
(and DELETE) than it is for SELECT.
e this is understandable, English is not my
native language 😉).
Regards,
Sigrid
-Original Message-
From: David Rowley
Sent: Wednesday, November 4, 2020 9:13 PM
To: Ehrenreich, Sigrid
Cc: [email protected]
Subject: Re: Partition pruning with joins
On Wed, 4 Nov 2
On Wed, 4 Nov 2020 at 02:20, Ehrenreich, Sigrid wrote:
>
> -- Statement
> explain SELECT
> count(*)
> FROM
> dim INNER JOIN fact ON (dim.part_key=fact.part_key)
> WHERE dim.part_key >= 110 and dim.part_key <= 160;
>
> Plan shows me, that all partitions are scanned:
> Aggregate (cost=461.00..461.0
PM
To: Ehrenreich, Sigrid ;
[email protected]
Subject: Re: Partition pruning with joins
On Tue, 2020-11-03 at 13:20 +, Ehrenreich, Sigrid wrote:
> I would like to join a partitioned table and have the joined columns in the
> where clause to be used for partition p
On Tue, 2020-11-03 at 13:20 +, Ehrenreich, Sigrid wrote:
> I would like to join a partitioned table and have the joined columns in the
> where clause to be used for partition pruning.
> From some readings in the internet, I conclude that this was not possible in
> v12. I hoped for the
> “imp
Thanks!
On Mon, Mar 23, 2020 at 12:10 AM Justin Pryzby wrote:
> On Sun, Mar 22, 2020 at 11:45:53PM -0400, Ronnie S wrote:
> > Hello All,
> >
> > While doing some tests with hash partitioning behavior in PG11 and 12, I
> > have found that PG11 is not performing partition pruning with DELETEs
> >
On Sun, Mar 22, 2020 at 11:45:53PM -0400, Ronnie S wrote:
> Hello All,
>
> While doing some tests with hash partitioning behavior in PG11 and 12, I
> have found that PG11 is not performing partition pruning with DELETEs
> (explain analyze returned >2000 lines). I then ran the same test in PG12
> a
HI ,
Ok thanks.
Regards,
Suganthi Sekar
From: Laurenz Albe
Sent: 14 February 2019 18:07:49
To: suganthi Sekar; [email protected]
Subject: Re: partition pruning
suganthi Sekar wrote:
> i am using Postgresql 11, i have 2 partition ta
On Thu, Feb 14, 2019 at 01:37:49PM +0100, Laurenz Albe wrote:
> There is no condition on the table "call_report2" in your query,
> so it is not surprising that all partitions are scanned, right?
Some people find it surprising, since: a.call_id=b.call_id
suganthi Sekar wrote:
> > explain analyze
>
suganthi Sekar wrote:
> i am using Postgresql 11, i have 2 partition table , when i joined both
> table in query
> a table its goes exact partition table , but other table scan all partition
>
> please clarify on this .
>
> i have enabled below parameter on in configuration file
> Note : a
22 matches
Mail list logo