Re: Statistics Import and Export - Mailing list pgsql-hackers

From Hari Krishna Sunder
Subject Re: Statistics Import and Export
Date
Msg-id CAAeiqZ0jqtJaigLa6WDAskRFM4gDCj3hNxmwiWs+wHU0gxCTKQ@mail.gmail.com
Whole thread Raw
In response to Re: Statistics Import and Export  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
Ah ya, forgot that reltuples are not always accurate. This sounds reasonable to me. 

On Mon, May 19, 2025 at 2:32 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
On Mon, May 19, 2025 at 02:13:45PM -0700, Hari Krishna Sunder wrote:
> I think it would be better to revert 9879105 since there can be a
> considerable number of true empty tables that we don´t need to process.

I'm not sure that's a use-case we really need to optimize.  Even with
100,000 empty tables, "vacuumdb --analyze-only --missing-stats-only --jobs
64" completes in ~5.5 seconds on my laptop.  Plus, even if reltuples is 0,
there might actually be rows in the table, in which case analyzing it will
produce rows in pg_statistic.

--
nathan

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Violation of principle that plan trees are read-only
Next
From: Andres Freund
Date:
Subject: Re: Violation of principle that plan trees are read-only