Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
Дата
Msg-id 87ll6mr5y8.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> No, not at all, because searching such an index will require a tree
> descent, thus negating the one true advantage of hash indexes.

The hash index still has to do a tree descent, it just has a larger branching
factor than the btree index.

btree indexes could have a special case hack to optionally use a large
branching factor for the root node, effectively turning them into hash
indexes. That would be useful for cases where you know the values will be very
evenly distributed and won't need to scan ranges, ie, when you're indexing a
hash function.

--
greg

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

Предыдущее
От: Peter Fein
Дата:
Сообщение: Re: JOIN on set of rows?
Следующее
От: Mischa Sandberg
Дата:
Сообщение: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL