Re: [HACKERS] Slow count(*) again...
Vitalii Tymchyshyn <tivv00@gmail.com>
From: Vitalii Tymchyshyn <tivv00@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: 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>, "david@lang.hm" <david@lang.hm>, Craig Ringer <craig@postnewspapers.com.au>, "pgsql-performance@postgresql.org" <pgsql-performance@postgresql.org>
Date: 2011-02-03T09:54:49Z
Lists: pgsql-hackers, pgsql-performance
02.02.11 20:32, Robert Haas написав(ла): > > Yeah. Any kind of bulk load into an empty table can be a problem, > even if it's not temporary. When you load a bunch of data and then > immediately plan a query against it, autoanalyze hasn't had a chance > to do its thing yet, so sometimes you get a lousy plan. May be introducing something like 'AutoAnalyze' threshold will help? I mean that any insert/update/delete statement that changes more then x% of table (and no less then y records) must do analyze right after it was finished. Defaults like x=50 y=10000 should be quite good as for me. Best regards, Vitalii Tymchyshyn