Re: Performance Optimization for Dummies 2 - the SQL - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: Performance Optimization for Dummies 2 - the SQL
Date
Msg-id 1160153623.6181.13.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: Performance Optimization for Dummies 2 - the SQL  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
Responses Re: Performance Optimization for Dummies 2 - the SQL  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-performance
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.

pgsql-performance by date:

Previous
From: "Carlo Stonebanks"
Date:
Subject: Re: Performance Optimization for Dummies 2 - the SQL
Next
From: "Merlin Moncure"
Date:
Subject: Re: Performance Optimization for Dummies 2 - the SQL