Re: Row estimates for empty tables - Mailing list pgsql-general

From Christophe Pettus
Subject Re: Row estimates for empty tables
Date
Msg-id A2D82246-2556-4BBB-8C44-7F729CC02317@thebuild.com
Whole thread Raw
In response to Re: Row estimates for empty tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Row estimates for empty tables
List pgsql-general

> On Jul 24, 2020, at 06:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> There's certainly not a lot besides tradition to justify the exact
> numbers used in this case.

Since we already special-case parent tables for partition sets, would a storage parameter that lets you either tell the
planner"no, really, zero is reasonable here" or sets a minimum number of rows to plan for be reasonable?  I happened to
getbit by this tracking down an issue where several tables in a large query had zero rows, and the planner's assumption
ofa few pages worth caused some sub-optimal plans.  The performance hit wasn't huge, but they were being joined to some
*very*large tables, and the differences added up. 
--
-- Christophe Pettus
   xof@thebuild.com




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Row estimates for empty tables
Next
From: Vasu Madhineni
Date:
Subject: TDE implementation in postgres which is in docker container