[HACKERS] Multicolumn hash indexes

Поиск
Список
Период
Сортировка
От Tomasz Ostrowski
Тема [HACKERS] Multicolumn hash indexes
Дата
Msg-id 252abaa6-4d71-17bd-bcaf-d0a2b0537bdc@ato.waw.pl
обсуждение исходный текст
Ответы Re: [HACKERS] Multicolumn hash indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Multicolumn hash indexes  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi.

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?

-- 
Tomasz "Tometzky" Ostrowski


-- 
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] [BUGS] BUG #14825: enum type: unsafe use?
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?