public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <[email protected]>
To: Matthew Planchard <[email protected]>
Cc: [email protected]
Subject: Re: Dealing with SeqScans when Time-based Partitions Cut Over
Date: Fri, 19 Dec 2025 09:49:48 -0500
Message-ID: <CAKAnmmL3_WPtWRrCy1t3zJOcDConYA__so4FZj_Bzzza-inJjw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

If this is still an issue after you check David's theory about premature
analyzing, another approach is to pre-populate and pre-analyze future
tables. Something like this:

* disable autovac on the future table
* detach the table from the main partition
* insert a few hundred thousand rows into it, then run analyze on it
* can pull rows from a current table, or just use random data on a key
column- whatever is enough to generate "good" stats
* delete the rows - the stats will remain
* reattach the table
* enable autovac if you like; I would not


Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support


view thread (4+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Dealing with SeqScans when Time-based Partitions Cut Over
  In-Reply-To: <CAKAnmmL3_WPtWRrCy1t3zJOcDConYA__so4FZj_Bzzza-inJjw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox