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

Vitalii Tymchyshyn <tivv00@gmail.com>

From: Vitalii Tymchyshyn <tivv00@gmail.com>
To: Kenneth Marshall <ktm@rice.edu>
Cc: david@lang.hm, Robert Haas <robertmhaas@gmail.com>, Jon Nelson <jnelson+pgsql@jamponi.net>, Mladen Gogala <mladen.gogala@vmsinfo.com>, 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-04T14:38:30Z
Lists: pgsql-hackers, pgsql-performance
04.02.11 16:33, Kenneth Marshall написав(ла):
>
> In addition, the streaming ANALYZE can provide better statistics at
> any time during the load and it will be complete immediately. As far
> as passing the entire table through the ANALYZE process, a simple
> counter can be used to only send the required samples based on the
> statistics target. Where this would seem to help the most is in
> temporary tables which currently do not work with autovacuum but it
> would streamline their use for more complicated queries that need
> an analyze to perform well.
>
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).
And you can't start after some threshold of data passed by since you may 
loose significant information (like minimal values).

Best regards, Vitalii Tymchyshyn