Re: [HACKERS] Multicolumn hash indexes

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Multicolumn hash indexes
Дата
Msg-id CA+TgmoZnzqZ35c7+ZaqhwTU8HKeKwCpRpgNJEHbRxO2t=7=S_g@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] Multicolumn hash indexes  (Tomasz Ostrowski <tometzky+pg@ato.waw.pl>)
Список pgsql-hackers
On Tue, Sep 26, 2017 at 5:41 PM, Tomasz Ostrowski
<tometzky+pg@ato.waw.pl> wrote:
> I've noticed that hash indexes can't currently (in PG10) be multicolumn. Are
> they technically hard to implement or just nobody took such a feature?
>
> I think multicolumn hash indexes should help pretty significantly with
> queries like:
> - where username=? and user_post_id=?
> - where client_id=? and period=? and invoice_number=?
> etc.
>
> I imagine that calculating a multicolumn hash should be pretty
> straightforward to implement - after hashing bytes of first column just keep
> going and update the hash state with bytes of a second and subsequent
> columns. And it should allow for faster (O(1), less IO) and much smaller
> (better cached, less IO again) multicolumn indexes. Also in PG10 hash
> indexes are WAL-logged and therefore much easier to work with. What do you
> think?

I was just thinking the same thing today.  I think it is a great idea,
but I don't have time to do the work myself at the moment.  I'd be
happy to help review, though.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Multicolumn hash indexes
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] User-perspective knowledge about wait events