Re: [HACKERS] Slow count(*) again...

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: david(at)lang(dot)hm
Cc: Vitalii Tymchyshyn <tivv00(at)gmail(dot)com>, Kenneth Marshall <ktm(at)rice(dot)edu>, Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [HACKERS] Slow count(*) again...
Date: 2011-02-05 06:37:49
Message-ID: AANLkTi=EkCUkQs9VTtW4aOBNNNV0gi8jYZhNgdHuFTKM@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Sat, Feb 5, 2011 at 12:46 AM, <david(at)lang(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-02-05 06:47:06 Re: pg_dump directory archive format / parallel pg_dump
Previous Message Robert Haas 2011-02-05 06:34:17 Re: OCLASS_FOREIGN_TABLE support is incomplete

Browse pgsql-performance by date

  From Date Subject
Next Message david 2011-02-05 07:15:52 Re: getting the most of out multi-core systems for repeated complex SELECT statements
Previous Message david 2011-02-05 05:46:30 Re: [HACKERS] Slow count(*) again...