Re: vacuum analyze query performance - help me understand

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Scot Kreienkamp <Scot(dot)Kreienkamp(at)la-z-boy(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: vacuum analyze query performance - help me understand
Date: 2025-08-20 16:26:19
Message-ID: CAKAnmmJKOykz=xwGGTRJX9arvhOLa6rXShv-S_sZ52urDfaXnQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Moving forward advice:

* Run the query more than once before doing a manual vacuum to rule out
caching.
* Change your flags for the vacuumdb from --quiet to --verbose and we can
see exactly what vacuum has done. Ideally have cron append to a file on disk
* Similarly, set log_autovacuum_min_duration to 0 (which logs all
autovacuum activity).
* As mentioned upthread, use explain (analyze, buffers, settings) for
better output
* Using the pg_buffercache extension can show you exactly what is in shared
buffers (for future debugging)

Cheers,
Greg

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Clarke 2025-08-20 16:56:47 Re: Domains vs data types
Previous Message Greg Sabino Mullane 2025-08-20 16:12:25 Re: Domains vs data types