Re: WTF with hash index?

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Олег Самойлов <splarv(at)ya(dot)ru>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: WTF with hash index?
Date: 2018-11-16 18:54:15
Message-ID: 20181116185415.GG3415@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* Олег Самойлов (splarv(at)ya(dot)ru) wrote:
> Ah, thanks. I am not a developer of PostgreSQL. I am a developer in PostgreSQL. :) And I see two hash indexes on the same data and one of them 43 times bigger then other, this looked like something terribly wrong. Just free idea how to considerably improve your product.

Ultimately, it might be less improvement overall and more of a
regression though, in the common cases.

This use-case isn't common for a hash index. If we changed all hash
indexes to instead be gin indexes of jsonb values, we'd end up with the
common hash index use-cases being much, much worse.

In the end, this comes down to choosing the right index for your data
and your queries, which is actually a rather difficult problem to handle
in some kind of automated way as there are lots of different trade-offs
to consider.

Thanks!

Stephen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2018-11-16 19:55:37 Re: Default Privilege Table ANY ROLE
Previous Message Alexey Bashtanov 2018-11-16 17:40:06 Re: Question about index on different tablespace and rebuild it