Re: inefficient/wrong plan cache mode selection for queries with partitioned tables (postgresql 17) - Mailing list pgsql-performance

From Tom Lane
Subject Re: inefficient/wrong plan cache mode selection for queries with partitioned tables (postgresql 17)
Date
Msg-id 38201.1747063982@sss.pgh.pa.us
Whole thread Raw
In response to Re: inefficient/wrong plan cache mode selection for queries with partitioned tables (postgresql 17)  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: inefficient/wrong plan cache mode selection for queries with partitioned tables (postgresql 17)
List pgsql-performance
Maxim Boguk <maxim.boguk@gmail.com> writes:
> And the problem is that the cost of a custom plan ignores the cost of
> planning itself (which is like 2x orders of magnitude worse than the cost
> of real time partition pruning of a generic plan).

False.  The estimate is evidently pretty wrong, but it's not that
there is no consideration at all.  See around line 1370 in
src/backend/utils/cache/plancache.c.

            regards, tom lane



pgsql-performance by date:

Previous
From: David Rowley
Date:
Subject: Re: inefficient/wrong plan cache mode selection for queries with partitioned tables (postgresql 17)
Next
From: Andrei Lepikhov
Date:
Subject: Re: inefficient/wrong plan cache mode selection for queries with partitioned tables (postgresql 17)