Re: [HACKERS] Slow count(*) again... - Mailing list pgsql-performance

From Robert Haas
Subject Re: [HACKERS] Slow count(*) again...
Date
Msg-id AANLkTi=EkCUkQs9VTtW4aOBNNNV0gi8jYZhNgdHuFTKM@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Slow count(*) again...  (david@lang.hm)
Responses Re: [HACKERS] Slow count(*) again...  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-performance
On Sat, Feb 5, 2011 at 12:46 AM,  <david@lang.hm> wrote:
>> Actually for me the main "con" with streaming analyze is that it adds
>> significant CPU burden to already not too fast load process. Especially if
>> it's automatically done for any load operation performed (and I can't see
>> how it can be enabled on some threshold).
>
> two thoughts
>
> 1. if it's a large enough load, itsn't it I/O bound?

Sometimes.  Our COPY is not as cheap as we'd like it to be.

> 2. this chould be done in a separate process/thread than the load itself,
> that way the overhead of the load is just copying the data in memory to the
> other process.

I think that's more expensive than you're giving it credit for.

But by all means implement it and post the patch if it works out...!

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-performance by date:

Previous
From: david@lang.hm
Date:
Subject: Re: [HACKERS] Slow count(*) again...
Next
From: david@lang.hm
Date:
Subject: Re: getting the most of out multi-core systems for repeated complex SELECT statements