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.
In response to
pgsql-performance by date
|Next:||From: Richard Huxton||Date: 2003-12-17 09:52:15|
|Subject: Re: Nested loop question|
|Previous:||From: Shridhar Daithankar||Date: 2003-12-17 06:31:06|
|Subject: Re: Why is restored database faster?|