Re: BUG #17650: For the sixth time, the clipping function in the 120 partition table planning stage fails - Mailing list pgsql-bugs

From Andy Fan
Subject Re: BUG #17650: For the sixth time, the clipping function in the 120 partition table planning stage fails
Date
Msg-id CAKU4AWpkOiDYO=3YYwS_gsH0-txOj8j=ST9akmdJSAoDuftUUg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17650: For the sixth time, the clipping function in the 120 partition table planning stage fails  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs


On Tue, Oct 18, 2022 at 10:06 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
 Then it'll decide "nope, we'll stick to custom
planning" and the subsequent executions take the same amount of
time as before.

I think we have known the cost model issue for any kind of run-time partition prune 
(initial partition prune or execution partition prune),  the issue is that we always cost
the partitions which have been pruned already.  One of the side effects is that a generic
plan is nearly impossible to win, hence planning effort is always there.   Do you think
we need to do anything for this?   We can't forecast how many / which partitions
are pruned or left,  but even we just improve the case where only 1 partition is left, we
improve the most common cases.  



--
Best Regards
Andy Fan

pgsql-bugs by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Next
From: Amit Kapila
Date:
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.