pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Lewis <mlewis@entrata.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Thomas Kellerer <shammat@gmx.net>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: PostgreSQL does not choose my indexes well
Date: Thu, 23 Apr 2020 12:31:16 -0400
Message-ID: <14950.1587659476@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHOFxGrf_CsHgfQKnQp18G0_1CC6aQCbQ5Rz5JuD2u_rSAQWDg@mail.gmail.com>
References: <35dc90d6-e0c2-13b8-3184-e3db5d854a78@gmail.com>
	<1bb37a19-77f6-8c49-073e-ed6251c98583@gmx.net>
	<CAKFQuwY9twbudMDvmuo+9Mjy0y-cJcvzPazD07-oB+WV1qOMnA@mail.gmail.com>
	<4315.1587655779@sss.pgh.pa.us>
	<CAHOFxGrf_CsHgfQKnQp18G0_1CC6aQCbQ5Rz5JuD2u_rSAQWDg@mail.gmail.com>

Michael Lewis <mlewis@entrata.com> writes:
>> "unless the table is mostly marked all-visible"

> Is that taken into account during planning when evaluating index scan vs
> sequential scan?

It is, although the planner's estimate is based on what the last ANALYZE
saw, which might be out-of-date.

			regards, tom lane





view thread (21+ messages)  latest in thread

Message-ID: <14950.1587659476@sss.pgh.pa.us>
Permalink:  ../14950.1587659476@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14950.1587659476@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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mlewis@entrata.com, david.g.johnston@gmail.com, shammat@gmx.net, pgsql-performance@lists.postgresql.org
  Subject: Re: PostgreSQL does not choose my indexes well
  In-Reply-To: <14950.1587659476@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