pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jf.levesque@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17710: Slow queries (100% CPU) after auto-vacuum
Date: Fri, 09 Dec 2022 21:13:09 -0500
Message-ID: <1185213.1670638389@sss.pgh.pa.us> (raw)
In-Reply-To: <17710-22ff6a35aac256ff@postgresql.org>
References: <17710-22ff6a35aac256ff@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> [ query gets slower after auto-vacuum ]

This sounds less like an auto-vacuum problem than an auto-analyze
problem.  That is, probably a background update of table statistics
is happening and that is triggering the planner to pick a different
plan.  In an ideal world, more up-to-date stats would always result
in a better plan, but reality is not always so kind.

There is not enough info here to diagnose the problem though.
At minimum we need to see EXPLAIN ANALYZE output for the problem
query in both the fast and slow states.  We have a wiki page about
reporting slow-query problems [1] which asks for quite a bit of
info, but for starters maybe the EXPLAIN ANALYZE results would
be enough.

> I am having an issue that started with 11.0 and is still present with 11.18.
> The issue is not present with 10.23.

If you could get EXPLAIN ANALYZE results from v10 as well as v11,
that would be useful too.

			regards, tom lane

[1] https://wiki.postgresql.org/wiki/Slow_Query_Questions





view thread (8+ messages)  latest in thread

Message-ID: <1185213.1670638389@sss.pgh.pa.us>
Permalink:  ../1185213.1670638389@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1185213.1670638389@sss.pgh.pa.us

 · 

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jf.levesque@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17710: Slow queries (100% CPU) after auto-vacuum
  In-Reply-To: <1185213.1670638389@sss.pgh.pa.us>

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

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