pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeremy Haile <jhaile@fastmail.fm>
To: Jim C. Nasby <jim@nasby.net>
To: pgsql-performance@postgresql.org
Subject: Re: High inserts, bulk deletes - autovacuum vs scheduled
Date: Wed, 10 Jan 2007 16:48:42 -0500
Message-ID: <1168465722.17889.1168630713@webmail.messagingengine.com> (raw)
In-Reply-To: <20070110212125.GZ12217@nasby.net>
References: <1168363601.5177.1168380907@webmail.messagingengine.com>
	<20070110203556.GX12217@nasby.net>
	<1168461780.9408.1168619515@webmail.messagingengine.com>
	<20070110212125.GZ12217@nasby.net>

> BTW, that's the default values for analyze... the defaults for vacuum
> are 2x that.

Yeah - I was actually more concerned that tables would need to be
analyzed more often than I was about vacuuming too often, so I used
analyze as the example.  Since my app is inserting constantly throughout
the day and querying for "recent" data - I want to make sure the query
planner realizes that there are lots of rows with new timestamps on
them.  In other words, if I run a query "select * from mytable where
timestamp > '9:00am'" - I want to make sure it hasn't been a day since
the table was analyzed, so the planner thinks there are zero rows
greater than 9:00am today.

> What's more important
> is to make sure critical tables (such as queue tables) are getting
> vacuumed frequently so that they stay small. 

Is the best way to do that usually to lower the scale factors?  Is it
ever a good approach to lower the scale factor to zero and just set the
thresholds to a pure number of rows? (when setting it for a specific
table)

Thanks,
Jeremy Haile



view thread (10+ messages)  latest in thread

Message-ID: <1168465722.17889.1168630713@webmail.messagingengine.com>
Permalink:  ../1168465722.17889.1168630713@webmail.messagingengine.com/
Also on:    postgresql.org/message-id/1168465722.17889.1168630713@webmail.messagingengine.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: jhaile@fastmail.fm, jim@nasby.net
  Subject: Re: High inserts, bulk deletes - autovacuum vs scheduled
  In-Reply-To: <1168465722.17889.1168630713@webmail.messagingengine.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