Re: Query runs 38 seconds for small database!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 08, 2006 at 08:36:42PM +0300, Andrus wrote:
> > BTW, you might want to cut all the autovac thresholds in half; that's
> > what I typically do.
> 
> I added ANALYZE command to my procedure which creates and loads data to 
> postgres database
> from other DBMS. This runs only onvce after installing my application.  I 
> hope this is sufficient.
> If default threshold is so conservative values I expect there is some reason 
> for it.

The only reason for being so conservative that I'm aware of was that it
was a best guess. Everyone I've talked to cuts the defaults down by at
least a factor of 2, sometimes even more.

BTW, these parameters are already tweaked from what we started with in
contrib/pg_autovacuum. It would allow a table to grow to 2x larger than
it should be before vacuuming, as opposed to the 40% that the current
settings allow. But even there, is there any real reason you want to
have 40% bloat? To make matters worse, those settings ensure that all
but the smallest databases will suffer runaway bloat unless you bump up
the FSM settings.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@xxxxxxxxxxxxx
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux