Re: VERY SLOW UPDATES

Поиск
Список
Период
Сортировка
От Alfred Perlstein
Тема Re: VERY SLOW UPDATES
Дата
Msg-id 20000818091714.P4854@fw.wintelcom.net
обсуждение исходный текст
Ответ на VERY SLOW UPDATES  ("Grembowicz, Kenneth" <GrembowiczK@NAVO.NAVY.MIL>)
Список pgsql-general
* Grembowicz, Kenneth <GrembowiczK@NAVO.NAVY.MIL> [000818 09:08] wrote:
> This is my situation...
> My table has about 1.6 million records.
> I am trying to use the update command to insert new data.
> However, it is extremely slow--about 2 to 4 seconds per update.
> You can see my problem is I am trying to update 40,000 records.
> Any insight or suggestion would be appreciated.
> -Ken
>
> PS I am currently wrapping my updates in a transaction block and indexes
> have been dropped.

I think that dropping indexes might be a bad idea particularly
since the update must search for the row to be updated and probably
is forced to do a sequential scan.  I would put the index on the
row of your UPDATE's where clause.

-Alfred

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

Предыдущее
От: David Shrewsbury
Дата:
Сообщение: vacuum messages
Следующее
От: "Carl Alexander"
Дата:
Сообщение: New user question -- alternate programmer interfaces?