From: Stephen Frost <sfrost@snowman.net>
To: Олег Самойлов <splarv@ya.ru>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: WTF with hash index?
Date: Fri, 16 Nov 2018 13:54:15 -0500
Message-ID: <20181116185415.GG3415@tamriel.snowman.net> (raw)
In-Reply-To: <7E931A8C-2CDE-43EC-8777-3EEFD43EF27B@ya.ru>
References: <20181113193723.kgki3ja6xpebo24l@alvherre.pgsql>
<7E931A8C-2CDE-43EC-8777-3EEFD43EF27B@ya.ru>
Greetings,
* Олег Самойлов (splarv@ya.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
Attachments:
signature.asc (application/pgp-signature, 818B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: sfrost@snowman.net, splarv@ya.ru, alvherre@2ndquadrant.com
Subject: Re: WTF with hash index?
In-Reply-To: <20181116185415.GG3415@tamriel.snowman.net>
References: <20181113193723.kgki3ja6xpebo24l@alvherre.pgsql> <7E931A8C-2CDE-43EC-8777-3EEFD43EF27B@ya.ru> <20181116185415.GG3415@tamriel.snowman.net>
* 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