Re: psql is hanging

Поиск
Список
Период
Сортировка
От Chris Mair
Тема Re: psql is hanging
Дата
Msg-id 285ebefdfdbaffaae8812c5ed1e695ef@smtp.hushmail.com
обсуждение исходный текст
Ответ на psql is hanging  (John Smith <localdevjs@gmail.com>)
Ответы Re: psql is hanging  (Chris Mair <chris@1006.org>)
Re: psql is hanging  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
> We're kind of pulling out our hair here, any ideas?

You might try issuing the command

   analyze;

right *before* the command that hangs.

The rationale behind this idea is that your script changed data
and the "hung" command uses a wrong plan based on outdated statistics.
By the time you run it manually it would be fast again, because in the
mean time the statistics have been updated automatically.

Analyze forces an immediate update of the statistics on the whole
database.

This can by itself take some time according to size of the
database. If my idea works, you can then further optimize by
doing analyze only on the changed tables.

Bye,
Chris.




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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: psql is hanging
Следующее
От: Chris Mair
Дата:
Сообщение: Re: psql is hanging