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

Re: Why is restored database faster?

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: David Shadovitz <david(at)shadovitz(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Why is restored database faster?
Date: 2003-12-17 06:42:46
Message-ID: Pine.LNX.4.44.0312170739330.10157-100000@zigo.dhs.org (view raw or flat)
Thread:
Lists: pgsql-performance
On Tue, 16 Dec 2003, David Shadovitz wrote:

> I backed up my database using pg_dump, and then restored it onto a different 
> server using psql.  I see that the query "SELECT COUNT(*) FROM myTable" 
> executes immediately on the new server but takes several seconds on the old 
> one.  (The servers are identical.)
> 
> What could account for this difference?  Clustering?  How can I get the 
> original server to perform as well as the new one?

You probably need to run VACUUM FULL. It locks the tables during its 
execution so only do it when the database is not in full use.

If this helps you probably need to do normal vacuums more often and maybe
tune the max_fsm_pages to be bigger. 

-- 
/Dennis


In response to

pgsql-performance by date

Next:From: Richard HuxtonDate: 2003-12-17 09:52:15
Subject: Re: Nested loop question
Previous:From: Shridhar DaithankarDate: 2003-12-17 06:31:06
Subject: Re: Why is restored database faster?

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