Re: performance for insert / update

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: performance for insert / update
Дата
Msg-id 20050628130102.GD20566@wolff.to
обсуждение исходный текст
Ответ на performance for insert / update  (Catalin Constantin <catalin@bounce-software.com>)
Ответы Re: performance for insert / update  (Catalin Constantin <catalin@bounce-software.com>)
Список pgsql-general
On Mon, Jun 27, 2005 at 18:46:58 +0300,
  Catalin Constantin <catalin@bounce-software.com> wrote:
> Hello,
>
> I have a pretty big database with about 200 000 rows.
> This is the main table. Also some other tables with FKs to this main
> table.
>
> I have to calculate some numbers for each entry at a certain amount of
> time and update the DB.
>
> I've noticed the update TAKES a very long time.

Do you have indexes on the foreign key fields in the referencing tables?
These are created by default and if you are updating the referenced tupples
a sequential search will be needed if there isn't an index.

Also of note is that there is recent a change to only do this if the referenced
fields in the record are changed, but I think this is new for 8.1. That
will make things go a lot faster if you aren't updating the referenced
fields in your main table.

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

Предыдущее
От: Sergey Levchenko
Дата:
Сообщение: ERROR: "TZ"/"tz" not supported
Следующее
От: "Zlatko Matic"
Дата:
Сообщение: Re: automating backup ?