Re: Postgresql vs. aggregates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgresql vs. aggregates
Дата
Msg-id 20286.1086846703@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Postgresql vs. aggregates  (jao@geophile.com)
Список pgsql-general
jao@geophile.com writes:
> I'd find all this much easier to reason about if I understood how
> the versions of a row are organized and accessed. How does postgresql
> locate the correct version of a row?

It doesn't, particularly.  A seqscan will of course visit all the
versions of a row, and an indexscan will visit all the versions
matching the indexscan key-column conditions.  It's up to the "time
qualification" tests (tqual.c) to accept only the version that is
visible to your transaction.

There are two or three implementation choices in the btree index
routines that are intended to increase the chances that you'll hit the
version you want sooner rather than later.  But they're only heuristics.
The bottom line is that we check all the versions till we find the
right one.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: tablespaces and schemas
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump and schema namespace notes