Re: postgresql multiple insert slow

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: postgresql multiple insert slow
Дата
Msg-id 11942.1077379425@sss.pgh.pa.us
обсуждение исходный текст
Ответ на postgresql multiple insert slow  ("Michael L. Hostbaek" <mich@freebsdcluster.org>)
Список pgsql-sql
"Michael L. Hostbaek" <mich@freebsdcluster.org> writes:
> I runs fine - and I get no errors - but it takes almost 25 minutes to
> complete.. I tried running the script while just grabbing the rows from
> the oracle database and writing to a text file - and then it only takes
> a couple of minutes .. So it must be the INSERT command that chokes - is
> there a better way to do it ? 

You probably want to add BEGIN/COMMIT operations around the loop.  See
the documentation's tips on bulk data loading:
http://www.postgresql.org/docs/7.4/static/populate.html
        regards, tom lane


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

Предыдущее
От: "V i s h a l Kashyap @ [Sai Hertz And Control Systems]"
Дата:
Сообщение: Re: Function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Function