Re: PostgreSQL does not choose my indexes well

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Thomas Kellerer <shammat(at)gmx(dot)net>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL does not choose my indexes well
Date: 2020-04-23 16:31:16
Message-ID: 14950.1587659476@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Michael Lewis <mlewis(at)entrata(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message David G. Johnston 2020-04-23 16:50:03 Re: PostgreSQL does not choose my indexes well
Previous Message Michael Lewis 2020-04-23 16:20:41 Re: PostgreSQL does not choose my indexes well