public inbox for [email protected]  
help / color / mirror / Atom feed
From: Zechman, Derek S <[email protected]>
To: [email protected] <[email protected]>
Subject: analyze-in-stages post upgrade questions
Date: Fri, 27 Jun 2025 13:35:27 +0000
Message-ID: <CO1PR04MB8281387B9AD9DE30976966BBC045A@CO1PR04MB8281.namprd04.prod.outlook.com> (raw)


We recently performed an upgrade from pg14 (14.18) to pg16 (16.9) and performed the analyze-in-stages post upgrade.  It has been noticed that some plans changed to use hash joins instead of nested loops.  Further investigation found it was because the parent table of partitioned tables did not have stats.  After running an ANALYZE on the parent tables we got similar plan an execution times as before.

I have two questions
1 - Why does analyze-in-stages not analyze the parent tables?
2 - What happens if we do not run analyze-in-stages post upgrade and just run an analyze?

Thanks,
Sean


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: analyze-in-stages post upgrade questions
  In-Reply-To: <CO1PR04MB8281387B9AD9DE30976966BBC045A@CO1PR04MB8281.namprd04.prod.outlook.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