pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Pallav Kalva <pkalva@deg.cc>
Cc: John A Meinel <john@arbash-meinel.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Wrong Stats and Poor Performance
Date: 27 Dec 2004 15:51:29 -0500
Message-ID: <87mzvzbh2m.fsf@stark.xeocode.com> (raw)
In-Reply-To: <41D067B9.5080308@deg.cc>
References: <41D059EB.9090201@deg.cc>
	<41D06223.9060500@arbash-meinel.com>
	<41D067B9.5080308@deg.cc>

Pallav Kalva <pkalva@deg.cc> writes:

> >> I had a setup a cronjob couple of weeks ago to run vacuum analyze every 3
> >> hours on this table and still my stats are totally wrong. This is affecting
> >> the performance of the queries running on this table very badly.
> >> How can i fix this problem ?  or is this the standard postgres behaviour ?

If you need it there's nothing wrong with running vacuum even more often than
this. As often as every 5 minutes isn't unheard of.

You should also look at raising the fsm settings. You need to run vacuum often
enough that on average not more tuples are updated in the intervening time
than can be kept track of in the fsm settings. So raising the fsm settings
allow you to run vacuum less often without having things bloat.

There's a way to use the output vacuum verbose gives you to find out what fsm
settings you need. But I don't remember which number you should be looking at
there offhand.

-- 
greg




view thread (5+ messages)

Message-ID: <87mzvzbh2m.fsf@stark.xeocode.com>
Permalink:  ../87mzvzbh2m.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/87mzvzbh2m.fsf@stark.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, pkalva@deg.cc, john@arbash-meinel.com
  Subject: Re: Wrong Stats and Poor Performance
  In-Reply-To: <87mzvzbh2m.fsf@stark.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox