Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uoSxG-004O0Z-Rx for pgsql-general@arkaria.postgresql.org; Tue, 19 Aug 2025 20:29:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uoSxG-00GrCo-7G for pgsql-general@arkaria.postgresql.org; Tue, 19 Aug 2025 20:29:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uoSxF-00GrCa-Qr for pgsql-general@lists.postgresql.org; Tue, 19 Aug 2025 20:29:14 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uoSxE-000iwH-0J for pgsql-general@lists.postgresql.org; Tue, 19 Aug 2025 20:29:13 +0000 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-436011e8ed1so895294b6e.2 for ; Tue, 19 Aug 2025 13:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755635352; x=1756240152; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=F9Kb2ZGZlTuc8n9n4JiNf2KfDCCDNseZEAE9IrMGXQk=; b=Bh0X+qkaq2tSTAJITJZb5d5jppVvX2UaYvK3BIaeS9SgmtDhDv16/jSkxc58v/rlrt bKd4ofw1SAljKeU5JM0picnbtdMD0SVkJR4Lk9P13BLxoYC1M0jvLNEB0W9QQLkam2ly qSQijVknIefmU0D4bi7q470ZuTf/l12LY/UWO7u9sqog+lN4tr6Mlbfp7fiid1VDiRGs Vk88JynlH6qSFCRprQOSmofnOQ7Q2Cjar1C250H8jPgeT1iHXg+Ehs585IVc7Wg637jp Fye6sude8G6lX9IUYw+V42GsFYgAN/Hw6i19/mSaKPmfXgrWcqWV3DyQPqPHrGqXMOTz Bw2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755635352; x=1756240152; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F9Kb2ZGZlTuc8n9n4JiNf2KfDCCDNseZEAE9IrMGXQk=; b=RS+WZOeuVqtkxNaRGRubjUU6hjPeqG2GQnsm7eLf5DM08sAain0aMMsTUo32+XNa8n cyYrK0/Togzw9iN2fybV22VnwmuazOtjAJe70B+uM+ugzteDLpaYqsm3oKvLIFdxuHYG IYUD7svHsqo8UXYLGH2uZpQbPw0G2H7Lj1i2BRNRUC9UJT2oDXmHIkv7Bm6RmjO7RBUl ne+huEox4Xwdwvc3SGsCPO3OAH5I+y9klHkx2Q/l9TrAh81oQ/gd96f3H5qd9wvTvZC1 70GPuiopS/N4+KGcQspf0cJPKPINDrO2sixBrzq4NyTaaR61VkHiZ4RMirA25ae9Fgi/ bBFw== X-Gm-Message-State: AOJu0YxUQbuCq1IvL4z5dlxLELduUks93nPmkKUpCQ14pWf5jHXfH2Ho DvyMw7Z4r288GHXjXOlEOs/uPJa46uiOy1SRqZBCZcprGtCqKbZRw/Mjowqvfk8jwC2KTQ0kdFX jaT26iXIDU7Z46LysMsdj6C/eAbz3OoA= X-Gm-Gg: ASbGncskUeE8HC5rBdwUPVKCqjnypT3GLKpC2QOvfvzDzVCQbi296PnJukefIsoTVAW GImHz4Mjm2nL36YC6aZPLpq7DPAx5UXFgayPxSyWySpCWLyrdLMRG41aRlbmVVg6VUvRgLs3c1e AvqcwJjJZOdpkrCm8lzZeNwxl8GXKImJjXl9n7yRs3RYuEDlEOYHmvHh5zJ6zvGnoG+/MYp70bS kUTorgotw0LWuEzWq/AclRF3IUY88o3X/810+Y= X-Google-Smtp-Source: AGHT+IFL6qb7aAlT4HrR/58kcuYt/sMxKalLP8xTxmsNwBMHdnxQh9F+1VxuU5adwciqks4lJewNnGS7Gh4HJsmSBgo= X-Received: by 2002:a05:6808:f05:b0:434:f9f:c204 with SMTP id 5614622812f47-437720b6aebmr198604b6e.24.1755635352097; Tue, 19 Aug 2025 13:29:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Tue, 19 Aug 2025 13:28:35 -0700 X-Gm-Features: Ac12FXxZxi8VHOWm1djfR5latP62IzpqB-BoVcO3VTD0sQu1s7WUkJK-5HPG36k Message-ID: Subject: Re: vacuum analyze query performance - help me understand To: Scot Kreienkamp Cc: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000008459f2063cbdb553" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008459f2063cbdb553 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 19, 2025 at 10:37=E2=80=AFAM Scot Kreienkamp < Scot.Kreienkamp@la-z-boy.com> wrote: > > We ran a (admittedly poorly written) select query against a subset of > tables which performed poorly. Then we ran a vacuum analyze against just > those tables involved in that query, then ran the same query again, which > performed exponentially better. Did/can you observe query buffer usage/performance for the two explain analyze executions? David J. --0000000000008459f2063cbdb553 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Aug 19, 2025 at 10:37=E2=80=AFAM Scot Kreienkamp &= lt;Scot.Kreienkamp@la-z-boy= .com> wrote:

We ran a (admittedly = poorly written) select query against a subset of tables which performed poo= rly.=C2=A0 Then we ran a vacuum analyze against just those tables involved = in that query, then ran the same query again, which performed exponentially= better.

Did/can you observe query buffe= r usage/performance for the two explain analyze executions?
<= br>
David J.

--0000000000008459f2063cbdb553--