Why Does UPDATE Take So Long?

Поиск
Список
Период
Сортировка
От Bill Thoen
Тема Why Does UPDATE Take So Long?
Дата
Msg-id 48E27755.7060004@gisnet.com
обсуждение исходный текст
Ответы Re: Why Does UPDATE Take So Long?  (Alan Hodgson <ahodgson@simkin.ca>)
Re: Why Does UPDATE Take So Long?  (Andreas Kretschmer <akretschmer@spamfence.net>)
Re: Why Does UPDATE Take So Long?  (Jeff Davis <pgsql@j-davis.com>)
Re: Why Does UPDATE Take So Long?  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: Why Does UPDATE Take So Long?  (Bill Thoen <bthoen@gisnet.com>)
Список pgsql-general
Working with PG 8.1 I'm trying to update a char(4) column, and it's
taking a very long time; 15 minutes so far and no end in sight. From the
explain, it doesn't seem like it should take that long, and this column
is not indexed. Sure, there's 2.7 million records but it only takes a
few minutes to scan the whole file. Is there some special overhead I
should be aware of with an UPDATE? I VACUUMed and ANALYZEd first, too.

Or am I just expecting too much?

Here's the explain:
explain UPDATE farms SET prog_year='2007';
                           QUERY PLAN
----------------------------------------------------------------
 Seq Scan on farms  (cost=0.00..59144.07 rows=2772207 width=54)
(1 row)


TIA,
- Bill Thoen


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

Предыдущее
От: "Taras Kopets"
Дата:
Сообщение: Re: Alias name from subquery
Следующее
От: Alan Hodgson
Дата:
Сообщение: Re: Why Does UPDATE Take So Long?