Re: Hash index initial size is too large given NULLs or partial indexes

2019-03-08 Thread Amit Kapila
On Fri, Mar 8, 2019 at 11:57 PM Tomas Vondra wrote: > On 3/8/19 7:14 PM, Jeff Janes wrote: > > > This goes back to when the pre-sizing was implemented in 2008 > > (c9a1cc694abef737548a2a). It seems to be an oversight, rather than > > something that was considered. > > > > Is this a bug that shoul

Re: Hash index initial size is too large given NULLs or partial indexes

2019-03-08 Thread Tomas Vondra
On 3/8/19 7:14 PM, Jeff Janes wrote: > Referring to this thread: > > https://dba.stackexchange.com/questions/231647/why-are-partial-postgresql-hash-indices-not-smaller-than-full-indices > > When a hash index is created on a populated table, it estimates the > number of buckets to start out wit

Hash index initial size is too large given NULLs or partial indexes

2019-03-08 Thread Jeff Janes
Referring to this thread: https://dba.stackexchange.com/questions/231647/why-are-partial-postgresql-hash-indices-not-smaller-than-full-indices When a hash index is created on a populated table, it estimates the number of buckets to start out with based on the number of tuples returned by estimate