Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coblM-0002hw-IV for pgsql-docs@arkaria.postgresql.org; Thu, 16 Mar 2017 20:12:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1coblL-0001Pd-DH for pgsql-docs@arkaria.postgresql.org; Thu, 16 Mar 2017 20:12:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cobkx-0000kl-QR for pgsql-docs@postgresql.org; Thu, 16 Mar 2017 20:12:19 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cobkv-0005QN-Ig for pgsql-docs@postgresql.org; Thu, 16 Mar 2017 20:12:19 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1cobks-0003Wg-HI; Thu, 16 Mar 2017 16:12:14 -0400 Date: Thu, 16 Mar 2017 16:12:14 -0400 From: Bruce Momjian To: mnikulyak@gmail.com Cc: pgsql-docs@postgresql.org Subject: Re: Excluding common values from the index Message-ID: <20170316201214.GB32733@momjian.us> References: <20170311230031.1429.23255@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170311230031.1429.23255@wrigleys.postgresql.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org 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 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