Re: Tuning New Server (slow function)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Tuning New Server (slow function)
Дата
Msg-id 693.1150993192@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Tuning New Server (slow function)  (Ron St-Pierre <ronDOTpgsql@shaw.ca>)
Список pgsql-performance
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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Why is my (empty) partial index query slow?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Poor performance - fixed by restart