Re: [DOCS] Excluding common values from the index - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: [DOCS] Excluding common values from the index
Date
Msg-id 20170316201214.GB32733@momjian.us
Whole thread Raw
In response to [DOCS] Excluding common values from the index  (mnikulyak@gmail.com)
List pgsql-docs
On Sat, Mar 11, 2017 at 11:00:31PM +0000, mnikulyak@gmail.com wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.6/static/indexes-partial.html
> Description:
>
> Rather than a report of an error, this letter is a suggestion of improvement
> of PostgreSQL.
>
> As per page https://www.postgresql.org/docs/9.6/static/indexes-partial.html,
> PostgreSQL avoids using indices when retrieving common values.
>
> Then, maybe, during the construction of an index, PostgreSQL should be
> detecting such common values, and exclude them from the index automatically.

That is an interesting idea, but what happens if the table changes and
those values become rare?  How would we adjust for that?  What if the
table is empty when the index is created?  How would we detect common
values?

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


pgsql-docs by date:

Previous
From: Alexander Law
Date:
Subject: Re: [DOCS] with
Next
From: Peter Eisentraut
Date:
Subject: Re: [DOCS] [HACKERS] Questionable tag usage