Re: Why is restored database faster?

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: Why is restored database faster?
Дата
Msg-id Pine.LNX.4.44.0312170739330.10157-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Why is restored database faster?  (David Shadovitz <david@shadovitz.com>)
Список 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 по дате отправления:

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: Why is restored database faster?
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Nested loop question