Re: COPY versus INSERT

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: COPY versus INSERT
Дата
Msg-id Pine.LNX.4.33.0305140925210.30919-100000@css120.ihs.com
обсуждение исходный текст
Ответ на COPY versus INSERT  ("Jay O'Connor" <joconnor@cybermesa.com>)
Список pgsql-general
On Tue, 13 May 2003, Jay O'Connor wrote:

> I'm loading a database with a lot of data from an external source (I'm
> convertin all my data to postgresql)
>
> Right now I'm just connecting to the database and issuing a whole lot of
> INSERTS and this is taking longer than I had planned.
>
> Would it be faster to just dump my database ina tab delimited format and
> use a COPY FROM or psql /copy command?

Speed wise, here's my take on what's faster:

copy = X time.
insert 10,000 rows at a time in transactions:  2-10X time
insert all rows in autocommit, i.e. single transactions:  (10^100)X

Of course, that last one is an exageration, but honestly, when you're
waiting on it, it feels that way. :-)


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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: fomatting an interval (resend)
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: query help