Re: Why is restored database faster? - Mailing list pgsql-performance

From Dennis Bjorklund
Subject Re: Why is restored database faster?
Date
Msg-id Pine.LNX.4.44.0312170739330.10157-100000@zigo.dhs.org
Whole thread Raw
In response to Why is restored database faster?  (David Shadovitz <david@shadovitz.com>)
List 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


pgsql-performance by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: Why is restored database faster?
Next
From: Richard Huxton
Date:
Subject: Re: Nested loop question