Re: Next Steps with Hash Indexes

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Next Steps with Hash Indexes
Дата
Msg-id CA+TgmoY9HvvtZ63nQv6C7WWNi7YOq14gt67M=Tu9=A46anE_kw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Next Steps with Hash Indexes  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: Next Steps with Hash Indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Aug 10, 2021 at 8:44 AM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> I was looking into the hash_multicoul.v3.patch, I have a question
>
>   <para>
> -  Hash indexes support only single-column indexes and do not allow
> -  uniqueness checking.
> +  Hash indexes support uniqueness checking.
> +  Hash indexes support multi-column indexes, but only store the hash value
> +  for the first column, so multiple columns are useful only for uniquness
> +  checking.
>   </para>
>
> The above comments say that we store hash value only for the first
> column,  my question is why don't we store for other columns as well?

I suspect it would be hard to store multiple hash values, one per
column. It seems to me that what we ought to do is combine the hash
values for the individual columns using hash_combine(64) and store the
combined value. I can't really imagine why we would NOT do that. It
seems like it would be easy to do and make the behavior of the feature
way less surprising.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: Added schema level support for publication.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Next Steps with Hash Indexes