pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: maxim.boguk@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17594: conditional hash indexes size (hash index ignore WHERE condition during CREATE INDEX?)
Date: Thu, 25 Aug 2022 16:49:09 -0400
Message-ID: <1573189.1661460549@sss.pgh.pa.us> (raw)
In-Reply-To: <17594-fca95086967695be@postgresql.org>
References: <17594-fca95086967695be@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> I found very weird situation with size of highly selective partial hash
> indexes (they has almost same size as full table hash index).

hashbuild() sets up the initial hash index size based on estimating
the current number of rows in the table, without any correction for
partial-index selectivity.  I don't find this to be a bug particularly.
The odds of making things worse via a bad estimate seem at least as
high as the odds of making things better.

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <1573189.1661460549@sss.pgh.pa.us>
Permalink:  ../1573189.1661460549@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1573189.1661460549@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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, maxim.boguk@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17594: conditional hash indexes size (hash index ignore WHERE condition during CREATE INDEX?)
  In-Reply-To: <1573189.1661460549@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