Re: How would I get information regarding update when running for a long time?

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: How would I get information regarding update when running for a long time?
Дата
Msg-id 20090722223942.GT5407@samason.me.uk
обсуждение исходный текст
Ответ на How would I get information regarding update when running for a long time?  (Chris Barnes <compuguruchrisbarnes@hotmail.com>)
Список pgsql-general
On Wed, Jul 22, 2009 at 10:00:38AM -0400, Chris Barnes wrote:
> 1) is this update expected to take this long?

1.5 hours is pretty slow, a couple of things spring to mind as to what
would make it go slow:

 1) it could be waiting for a lock (the pg_locks and pg_stat_activity
    views may help here)

 2) maintaining all those indexes is going to be slow (vmstat or better
    iostat will tell you what your system/disks are doing)

> 2) is there something that I did wrong with the update causing this
> slow time?

None of those indexes are enforcing a UNIQUE constraint, are you sure
that the id column in those tables uniquely identify the rows in the
table?  This isn't going to make it slow, but will cause you to get a
non-deterministic (i.e. normally "wrong") answer.

--
  Sam  http://samason.me.uk/

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

Предыдущее
От: Nathan Jahnke
Дата:
Сообщение: plperl spi_prepare and arrays
Следующее
От: Andreas Wenk
Дата:
Сообщение: Re: Can LIKE under utf8 use INDEXes?