pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Carlo Stonebanks <stonec.register@sympatico.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance Optimization for Dummies 2 - the SQL
Date: Fri, 06 Oct 2006 11:53:43 -0500
Message-ID: <1160153623.6181.13.camel@state.g2switchworks.com> (raw)
In-Reply-To: <eg611q$l0m$1@news.hub.org>
References: <eft782$5a1$1@news.hub.org>
	<b42b73150610030804q2719222du57c63a085e26a5a4@mail.gmail.com>
	<efu8tf$1blk$1@news.hub.org>
	<b42b73150610031221y4955e663ped999a83a810d318@mail.gmail.com>
	<eg0u6e$hbr$1@news.hub.org>
	<b42b73150610041407y3554f311u1329c4f3bdc53999@mail.gmail.com>
	<eg1dai$1tfa$1@news.hub.org>
	<b42b73150610042326v7fdeed17rf6b96e52a681a6db@mail.gmail.com>
	<eg2cds$29en$1@news.hub.org>
	<b42b73150610050630t76e9eedeh45a382729d35f2f6@mail.gmail.com>
	<eg611q$l0m$1@news.hub.org>

On Fri, 2006-10-06 at 11:44, Carlo Stonebanks wrote:
> This didn't work right away, but DID work after running a VACUUM FULL. In 
> other words, i was still stuck with a sequential scan until after the 
> vacuum.
> 
> I turned autovacuum off in order to help with the import, but was perfoming 
> an ANALYZE with every 500 rows imported.
> 
> With autovacuum off for imports, how frequently should I VACUUM?

Basically once the query planner stops using seq scans is usually good
enough, although sometimes there's a bit of a period where it'll be
using nested loops and then switch to merge etc...

Every 500 is probably a bit much.  After the first few thousand rows,
run an analyze, and after about 5 to 10 thousand another analyze and you
should be set.



view thread (38+ messages)  latest in thread

Message-ID: <1160153623.6181.13.camel@state.g2switchworks.com>
Permalink:  ../1160153623.6181.13.camel@state.g2switchworks.com/
Also on:    postgresql.org/message-id/1160153623.6181.13.camel@state.g2switchworks.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: smarlowe@g2switchworks.com, stonec.register@sympatico.ca
  Subject: Re: Performance Optimization for Dummies 2 - the SQL
  In-Reply-To: <1160153623.6181.13.camel@state.g2switchworks.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