| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера