Re: Critical performance problems on large databases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gunther Schadow <gunther(at)aurora(dot)regenstrief(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Critical performance problems on large databases
Date: 2002-04-10 23:02:13
Message-ID: 23861.1018479733@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gunther Schadow <gunther(at)aurora(dot)regenstrief(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Command Prompt, Inc. 2002-04-10 23:13:51 ANNOUNCE: Mammoth PostgreSQL
Previous Message Tom Lane 2002-04-10 22:56:01 Re: COPY Error Message is Confusing