Skip site navigation (1) Skip section navigation (2)

Re: Postgresql optimisation

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgresql optimisation
Date: 2009-10-28 16:36:52
Message-ID: alpine.DEB.2.00.0910281634330.19472@aragorn.flymine.org (view raw or flat)
Thread:
Lists: pgsql-performance
On Wed, 28 Oct 2009, Dave Dutcher wrote:
> Also if you switch to truncate then you should ANALYSE the tables after you
> finish inserting.  Note that VACUUM ANALYSE is not necessary after a
> truncate/insert because there should be no dead tuples to vacuum.

Perhaps reading the other replies in the thread before replying yourself 
might be advisable, because this previous reply directly contradicts you:

On Wed, 28 Oct 2009, Kevin Grittner wrote:
> I recommend VACUUM ANALYZE of the table(s) after this step. Without
> that, the first query to read each tuple sets its hint bits and
> rewrites it, causing a surprising delay at unpredictable times
> (although heavier near the start of the day).

There *is* a benefit of running VACUUM ANALYSE rather than just ANALYSE.

Matthew

-- 
 I suppose some of you have done a Continuous Maths course. Yes? Continuous
 Maths? <menacing stares from audience> Whoah, it was like that, was it!
                                        -- Computer Science Lecturer

In response to

Responses

pgsql-performance by date

Next:From: Dave DutcherDate: 2009-10-28 17:23:18
Subject: Re: Postgresql optimisation
Previous:From: Dave DutcherDate: 2009-10-28 16:30:39
Subject: Re: Postgresql optimisation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group