pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: asif ali <asif_icrossing@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Weird performance drop after VACUUM
Date: Mon, 29 Aug 2005 14:28:56 -0600
Message-ID: <20050829202856.GA99478@winnie.fuhr.org> (raw)
In-Reply-To: <20050829180717.74297.qmail@web35207.mail.mud.yahoo.com>
References: <20050827014126.GA33637@winnie.fuhr.org>
	<20050829180717.74297.qmail@web35207.mail.mud.yahoo.com>

On Mon, Aug 29, 2005 at 11:07:17AM -0700, asif ali wrote:
> The database is on the same system.
> What I am doing is only "VACUUM analyze 
> conversion_table"
> 
> I did the the same thing on a newly created database.
> And got the same result. So after "VACUUM analyze"
> performance dropped.
> Please see this. Runtime changes from "7755.115" to
> "14859.291" ms

As has been pointed out a couple of times, you're getting a different
plan after VACUUM ANALYZE because the row count estimates are more
accurate.  Unfortunately the more accurate estimates result in a
query plan that's slower than the plan for the less accurate
estimates.  PostgreSQL *thinks* the plan will be faster but your
results show that it isn't, so you might need to adjust some of the
planner's cost constants.

A asked some questions that you didn't answer, so I'll ask them again:

What's your effective_cache_size setting?
What's your work_mem (8.x) or sort_mem (7.x) setting?
What's your random_page_cost setting?
How much available RAM does the machine have?
What version of PostgreSQL are you running?

Various tuning guides give advice on how to set the above and other
configuration variables.  Here's one such guide:

http://www.powerpostgresql.com/PerfList/

-- 
Michael Fuhr



view thread (15+ messages)  latest in thread

Message-ID: <20050829202856.GA99478@winnie.fuhr.org>
Permalink:  ../20050829202856.GA99478@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050829202856.GA99478@winnie.fuhr.org

 · 

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: mike@fuhr.org, asif_icrossing@yahoo.com
  Subject: Re: Weird performance drop after VACUUM
  In-Reply-To: <20050829202856.GA99478@winnie.fuhr.org>

* 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