Re: count(*) performance improvement ideas

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: count(*) performance improvement ideas
Дата
Msg-id 20299.1208310958@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: count(*) performance improvement ideas  ("Stephen Denne" <Stephen.Denne@datamail.co.nz>)
Список pgsql-hackers
"Stephen Denne" <Stephen.Denne@datamail.co.nz> writes:
> The custom variable class can also be used to aggregate the deltas within a transaction, though there are some minor
difficulties:

> 1) They only store text
> 2) You can only find out that a value has not been set by catching an exception
> 3) There is no way to list the settings.

As for 2) and 3), can't you look into the pg_settings view?

> The time to create them for the first time for a connection seems to
vary a bit, between 200 and 1000 per minute.

Yeah, that path is not optimized at all because it was never considered
performance-critical.  Updating an existing variable should be cheaper.
        regards, tom lane


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

Предыдущее
От: "Stephen Denne"
Дата:
Сообщение: Re: count(*) performance improvement ideas
Следующее
От: "Stephen Denne"
Дата:
Сообщение: Re: count(*) performance improvement ideas