Re: Need theory/comprehension help on Multi-Column indexes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Need theory/comprehension help on Multi-Column indexes
Дата
Msg-id 20412.1104874380@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Need theory/comprehension help on Multi-Column indexes  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Need theory/comprehension help on Multi-Column indexes  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> I've been poking around the indexing code, and I really don't understand the 
> page structure and splittng/branching for multi-column BTree indexes.

It's not fundamentally different from single-column indexes.  The only
aspect of a btree index that requires any knowledge about the content of
index entries is the "compare two index entries for lesser, equal, or
greater" operation.  For that, we just compare the first columns, then
compare the second columns if the first are equal, etc.  Plain
lexicographic sort semantics.

Everything else in the btree code just considers an index entry to be an
undifferentiated tuple.
        regards, tom lane


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

Предыдущее
От: "Serguei A. Mokhov"
Дата:
Сообщение: Re: Final call for translation updates
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Need theory/comprehension help on Multi-Column indexes