Re: cluster index on a table

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: cluster index on a table
Дата
Msg-id 407d949e0907161349r110ddd22v568ccfbf0281a682@mail.gmail.com
обсуждение исходный текст
Ответ на Re: cluster index on a table  (Scott Carey <scott@richrelevance.com>)
Ответы Re: cluster index on a table
Список pgsql-performance
On Thu, Jul 16, 2009 at 9:06 PM, Scott Carey<scott@richrelevance.com> wrote:
> Keep the old page around or a copy of it that old transactions reference?
> Just more Copy on Write.
> How is that different from a nested loop on an index scan/seek currently?
> Doesn't an old transaction have to reference an old heap page through an
> index with the current implementation?  At least, the index references
> multiple versions and their visibility must be checked.  Can a similar
> solution work here?  Just reference the pre and post split pages and filter
> by visibility?

That would be a completely different architecture than we have now.
We're not Oracle, Postgres does all this at the tuple level, not at
the page level. We have tuple versions, not page versions, and tuple
locks, not page locks.

The old transaction has to reference a heap page through an index with
the current implementation. But it can do so safely precisely because
the tuple will be where the index references it as long as necessary.
As long as that old transaction is live it's guaranteed not to be
removed by vacuum (well... except by VACUUM FULL but that's a whole
nother story).

Actually this is probably the clearest problem with IOT in the
Postgres universe. What do other indexes use to reference these rows
if they can move around?

I wanted to call Heikki's "grouped index item" patch that he worked on
for so long index organized tables. Basically that's what they are
except the leaf tuples are stored in the regular heap like always,
hopefully in index order. And there are no leaf tuples in the index so
the actual index is much much smaller. It doesn't look like a
traditional IOT but it behaves a lot like one in the space savings and
access patterns.

--
greg
http://mit.edu/~gsstark/resume.pdf

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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1
Следующее
От: Marc Cousin
Дата:
Сообщение: Re: Very big insert/join performance problem (bacula)