Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyHoL-0001Wf-OV for pgsql-general@arkaria.postgresql.org; Tue, 29 Jun 2021 17:46:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lyHoJ-000293-11 for pgsql-general@arkaria.postgresql.org; Tue, 29 Jun 2021 17:46:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyHoI-00028v-OQ for pgsql-general@lists.postgresql.org; Tue, 29 Jun 2021 17:46:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyHoC-00080v-Dm for pgsql-general@lists.postgresql.org; Tue, 29 Jun 2021 17:46:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15THk2mq452840; Tue, 29 Jun 2021 13:46:02 -0400 From: Tom Lane To: Ron cc: PostgreSQL General Subject: Re: Do table-level CHECK constraints affect the query optimizer? In-reply-to: <69232971-4992-6df9-d629-d45e8a176526@gmail.com> References: <5f718120-a286-71ca-3d31-7bad70f0194e@gmail.com> <374d530d-ec98-f1ea-8d41-21e661aa9ab4@gmail.com> <449566.1624984976@sss.pgh.pa.us> <69232971-4992-6df9-d629-d45e8a176526@gmail.com> Comments: In-reply-to Ron message dated "Tue, 29 Jun 2021 12:33:46 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <452838.1624988762.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 29 Jun 2021 13:46:02 -0400 Message-ID: <452839.1624988762@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron writes: > On 6/29/21 11:42 AM, Tom Lane wrote: >> If there's a significant difference in relallvisible fractions, that >> would point to something different in your VACUUM housekeeping on >> the two systems. > Prod is brand new.=C2=A0 Loaded on Saturday; we saw this problem on Sund= ay during = > pre-acceptance.=C2=A0 Thus, while running ANALYZE was top of the list of= Things = > To Do, running VACUUM was low. > Is that a mistaken belief? ANALYZE won't update relallvisible AFAIR, while VACUUM will. So if you are depending on lots of IOS, you need a round of vacuuming. regards, tom lane