Re: Critical performance problems on large databases

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Critical performance problems on large databases
Дата
Msg-id 23861.1018479733@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Critical performance problems on large databases  (Gunther Schadow <gunther@aurora.regenstrief.org>)
Ответы Re: Critical performance problems on large databases  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Список pgsql-general
Gunther Schadow <gunther@aurora.regenstrief.org> writes:
> We also noted that a
> SELECT COUNT(*) FROM BigQuery;
> can take quite a long time and again use a lot of resources,
> whereas
> SELECT COUNT(smallcolumn) FROM BigQuery;
> may be faster and less resource consuming.

This is complete nonsense... if anything, the second one will take
more cycles, since it has to actually examine a column.

As for the other thing, use a cursor and "fetch" a few rows at a time
if you want to overlap frontend and backend processing.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: COPY Error Message is Confusing
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Critical performance problems on large databases