Re: Performance Problem

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Performance Problem
Дата
Msg-id 20061013090057.GG27503@a-kretschmer.de
обсуждение исходный текст
Ответ на Re: Performance Problem  ("Uwe C. Schroeder" <uwe@oss4u.com>)
Список pgsql-general
am  Fri, dem 13.10.2006, um  1:55:06 -0700 mailte Uwe C. Schroeder folgendes:
> > Does the table you're inserting into have indexes or foreign keys?
> > Either of those slow down loading considerably. One commen workaround
> > is to drop the indexes and constraints, load the data and re-add them.
>
> Why do you COPY the data into a temporary table just to do a "insert into
> org_table  (select * from temp_table);" ? Since you're copying ALL records
> anyways, why don't you just copy the data into the "org_table" directly?

Perhaps he want to modify the data in this temp. table?


>
> Also look for the "autocommit" setting. If autocommit is on, every insert is a
> transaction on it's own - leading to a lot of overhead. Turning autocommit
> off and running the inserts in batches of - say 1000 inserts per transaction
> - will increase speed considerably.

A 'insert into org_table  (select * from temp_table);' is only ONE
transaction.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

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

Предыдущее
От: "Uwe C. Schroeder"
Дата:
Сообщение: Re: Performance Problem
Следующее
От: jef peeraer
Дата:
Сообщение: encoding problem