pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Ron <ronljohnsonjr@gmail.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: Do table-level CHECK constraints affect the query optimizer?
Date: Tue, 29 Jun 2021 10:46:03 -0700
Message-ID: <D1BF0ED4-64AE-4A00-8449-A877DC8B2A99@enterprisedb.com> (raw)
In-Reply-To: <69232971-4992-6df9-d629-d45e8a176526@gmail.com>
References: <5f718120-a286-71ca-3d31-7bad70f0194e@gmail.com>
	<CAHOFxGpN2_Jfe9Ah1WqLgEGMtOkjqzDp+bb_SVm2O28rojZJQA@mail.gmail.com>
	<374d530d-ec98-f1ea-8d41-21e661aa9ab4@gmail.com>
	<449566.1624984976@sss.pgh.pa.us>
	<69232971-4992-6df9-d629-d45e8a176526@gmail.com>



> On Jun 29, 2021, at 10:33 AM, Ron <ronljohnsonjr@gmail.com> wrote:
> 
> Prod is brand new.  Loaded on Saturday; we saw this problem on Sunday during pre-acceptance.  Thus, while running ANALYZE was top of the list of Things To Do, running VACUUM was low.
> 
> Is that a mistaken belief?

You might want to run VACUUM FREEZE and then retry your test query using EXPLAIN.  See if it switches to an index only scan after the VACUUM FREEZE.

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company








view thread (10+ messages)  latest in thread

Message-ID: <D1BF0ED4-64AE-4A00-8449-A877DC8B2A99@enterprisedb.com>
Permalink:  ../D1BF0ED4-64AE-4A00-8449-A877DC8B2A99@enterprisedb.com/
Also on:    postgresql.org/message-id/D1BF0ED4-64AE-4A00-8449-A877DC8B2A99@enterprisedb.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mark.dilger@enterprisedb.com, ronljohnsonjr@gmail.com
  Subject: Re: Do table-level CHECK constraints affect the query optimizer?
  In-Reply-To: <D1BF0ED4-64AE-4A00-8449-A877DC8B2A99@enterprisedb.com>
  References: <5f718120-a286-71ca-3d31-7bad70f0194e@gmail.com> <CAHOFxGpN2_Jfe9Ah1WqLgEGMtOkjqzDp+bb_SVm2O28rojZJQA@mail.gmail.com> <374d530d-ec98-f1ea-8d41-21e661aa9ab4@gmail.com> <449566.1624984976@sss.pgh.pa.us> <69232971-4992-6df9-d629-d45e8a176526@gmail.com> <D1BF0ED4-64AE-4A00-8449-A877DC8B2A99@enterprisedb.com>

* 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