Re: count(*) using index scan in "query often, update rarely" environment

Поиск
Список
Период
Сортировка
От Steinar H. Gunderson
Тема Re: count(*) using index scan in "query often, update rarely" environment
Дата
Msg-id 20051007104816.GA8371@uio.no
обсуждение исходный текст
Ответ на count(*) using index scan in "query often, update rarely" environment  ("Cestmir Hybl" <cestmirl@freeside.sk>)
Ответы Re: count(*) using index scan in "query often, update rarely" environment  (mark@mark.mielke.cc)
Список pgsql-performance
On Fri, Oct 07, 2005 at 11:24:05AM +0200, Cestmir Hybl wrote:
> Isn't it possible (and reasonable) for these environments to keep track of
> whether there is a transaction in progress with update to given table and
> if not, use an index scan (count(*) where) or cached value (count(*)) to
> perform this kind of query?

Even if there is no running update, there might still be dead rows in the
table. In any case, of course, a new update could always be occurring while
your counting query was still running.

/* Steinar */
--
Homepage: http://www.sesse.net/

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

Предыдущее
От: "Cestmir Hybl"
Дата:
Сообщение: Re: count(*) using index scan in "query often, update rarely" environment
Следующее
От: "Cestmir Hybl"
Дата:
Сообщение: Re: count(*) using index scan in "query often, update rarely" environment