Re: More Performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: More Performance
Дата
Msg-id 25715.958871629@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: More Performance  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> What heap? The index is a b-tree in this case. Thus you should be able
>> to walk it and get the sorted result without ever touching the data
>> file.

> We can't read data from the index.  It would be nice if we could, but we
> can't.

The reason we can't is that we don't store tuple validity data in
indexes.  The index entry has the key value and a pointer to the tuple
in the main heap file, but we have to visit the tuple to find out
whether it's committed or dead.  If we did otherwise, then committing or
killing tuples would be lots slower than it is, because we'd have to
find and mark all the index entries pointing at the tuple, not just the
tuple itself.  It's a tradeoff... but we think it's a good one.

> I think we believe that there are very few cases where this
> would be win.  Usually you need non-indexed data too.

Right, non-toy examples usually read additional data columns anyway.
        regards, tom lane


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

Предыдущее
От: "Robert B. Easter"
Дата:
Сообщение: Re: Thus spoke SQL3 (on OO)
Следующее
От: "Mikheev, Vadim"
Дата:
Сообщение: Berkeley DB...