Re: index does not improve performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index does not improve performance
Дата
Msg-id 17369.1012673338@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: index does not improve performance  (Milos Prudek <milos.prudek@tiscali.cz>)
Список pgsql-general
Milos Prudek <milos.prudek@tiscali.cz> writes:
> think that FoxPro was able to return COUNT immediately, if index was
> used, no matter what number of records the condition was true for. I
> wonder if this is something that PostgreSQL will eventually be able to
> do, or if it is simply not technically possible for some reason.

It is not going to happen in the foreseeable future, for the simple
reason that there isn't necessarily a uniquely correct COUNT value
in Postgres' view of the world, and thus no prospect of maintaining
a single counter that would be of any use.  You may care to read the
MVCC chapter of the manual,

http://developer.postgresql.org/docs/postgres/mvcc.html

Also see my talk on Postgres transactions, a PDF available at

http://developer.postgresql.org/osdn.php

This is a bit out of date (the comments about crash-safeness predate
the addition of WAL) but the discussion of tuple visibility is still
very relevant.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Distributing index's/tables/logs/etc.
Следующее
От: Frank Bax
Дата:
Сообщение: Re: index does not improve performance