slow update but have an index

Поиск
Список
Период
Сортировка
От Feite Brekeveld
Тема slow update but have an index
Дата
Msg-id 3B7CFB2D.6418E7E5@osiris-it.nl
обсуждение исходный текст
Ответы Re: slow update but have an index  (Martijn van Oosterhout <kleptog@svana.org>)
Re: slow update but have an index  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: slow update but have an index  (Tod McQuillin <devin@spamcop.net>)
Список pgsql-general
Hi,

I have a table with no relations to other tables. It has a sequence
number field (integer) and a status field being a char.

There is a unique index on the seqno field.

Now this table has about 80,000 records. I need to update 74,000 status
fields. So I made a dump, and hacked the dump into SQL statements like:

update accounting set status = 'C' where seqno = 1566385;
....
and the other 74,000



This is awfully slow. How come ? The index on the seqno should give
speedy access to the record.

Thanks,

--
Feite Brekeveld
feite.brekeveld@osiris-it.nl
http://www.osiris-it.nl




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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Query Approach and performance
Следующее
От: Micah Yoder
Дата:
Сообщение: Re: LARGE db dump/restore for upgrade question