pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Excluding common values from the index
2+ messages / 2 participants
[nested] [flat]

* Excluding common values from the index
@ 2017-03-11 23:00 mnikulyak@gmail.com
  2017-03-16 20:12 ` Re: Excluding common values from the index Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 2+ messages in thread

From: mnikulyak@gmail.com @ 2017-03-11 23:00 UTC (permalink / raw)
  To: pgsql-docs

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.

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Excluding common values from the index
  2017-03-11 23:00 Excluding common values from the index mnikulyak@gmail.com
@ 2017-03-16 20:12 ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2017-03-16 20:12 UTC (permalink / raw)
  To: mnikulyak@gmail.com; +Cc: 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 +


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-03-16 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-03-11 23:00 Excluding common values from the index mnikulyak@gmail.com
2017-03-16 20:12 ` Bruce Momjian <bruce@momjian.us>

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