Re: [HACKERS] Slow count(*) again...
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: david@lang.hm
Cc: Vitalii Tymchyshyn <tivv00@gmail.com>, Kenneth Marshall <ktm@rice.edu>, Jon Nelson <jnelson+pgsql@jamponi.net>, Andrew Dunstan <andrew@dunslane.net>, Bruce Momjian <bruce@momjian.us>, Tom Lane <tgl@sss.pgh.pa.us>, Craig Ringer <craig@postnewspapers.com.au>, "pgsql-performance@postgresql.org" <pgsql-performance@postgresql.org>
Date: 2011-02-05T06:37:49Z
Lists: pgsql-hackers, 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