pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron St-Pierre <ronDOTpgsql@shaw.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: Tuning New Server (slow function)
Date: Thu, 22 Jun 2006 12:19:52 -0400
Message-ID: <693.1150993192@sss.pgh.pa.us> (raw)
In-Reply-To: <44996C83.5040302@shaw.ca>
References: <44996C83.5040302@shaw.ca>

Ron St-Pierre <ronDOTpgsql@shaw.ca> writes:
> We just purchased a new Dell PowerEdge 2800 (dual xeon, 8GB RAM, raid 4, 
> RHEL, postgres 8.1) and ported our old database over to it (single cpu, 
> 2GB RAM, no raid, postgres 7.4). Our apps perform great on it, however 
> some queries are super slow. One function in particular, which used to 
> take 15-30 minutes on the old server, has been running now for over 12 
> hours:

A fairly common gotcha in updating is to forget to ANALYZE all your
tables after loading the data into the new server.  My bet is that some
of the queries in the function are using bad plans for lack of
up-to-date statistics.

If ANALYZEing and then starting a fresh session (to get rid of the
function's cached plans) doesn't help, you'll need to do some comparison
of EXPLAIN plans between old and new server to try to figure out where
the problem is.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <693.1150993192@sss.pgh.pa.us>
Permalink:  ../693.1150993192@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/693.1150993192@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, ronDOTpgsql@shaw.ca
  Subject: Re: Tuning New Server (slow function)
  In-Reply-To: <693.1150993192@sss.pgh.pa.us>

* 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