Re: bulk insert performance problem

Поиск
Список
Период
Сортировка
От Matthew
Тема Re: bulk insert performance problem
Дата
Msg-id Pine.LNX.4.64.0804081457200.20402@aragorn.flymine.org
обсуждение исходный текст
Ответ на Re: bulk insert performance problem  (Mark Stosberg <mark@summersault.com>)
Список pgsql-performance
On Tue, 8 Apr 2008, Mark Stosberg wrote:
>> Any idea? Is there any other improvements I could do?
>
> Are you using the "COPY" syntax in the import script or individual insert
> statements? Using COPY will always be *much* faster.

PostgreSQL (latest versions at least) has an optimisation if you create a
table in the same transaction as you load data into it. So, if you have a
database dump, load it in using psql -1, which wraps the entire operation
in a single transaction. Of course, a COPY dump will load a lot faster
than a INSERT dump.

Matthew

--
What goes up must come down. Ask any system administrator.

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

Предыдущее
От: Mark Stosberg
Дата:
Сообщение: Re: bulk insert performance problem
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Performance with temporary table