performance of loading CSV data with COPY is 50 times faster thanPerl::DBI

Поиск
Список
Период
Сортировка
От Matthias Apitz
Тема performance of loading CSV data with COPY is 50 times faster thanPerl::DBI
Дата
Msg-id 20200131182441.GA8181@c720-r342378
обсуждение исходный текст
Ответы Re: performance of loading CSV data with COPY is 50 times faster thanPerl::DBI  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: performance of loading CSV data with COPY is 50 times faster than Perl::DBI  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: performance of loading CSV data with COPY is 50 times fasterthan Perl::DBI  (Steven Lembark <lembark@wrkhors.com>)
Список pgsql-general
Hello,

Since ages, we transfer data between different DBS (Informix, Sybase,
Oracle, and now PostgreSQL) with our own written tool, based on
Perl::DBI which produces a CSV like export in a common way, i.e. an
export of Oracle can be loaded into Sybase and vice versa. Export and
Import is done row by row, for some tables millions of rows.

We produced a special version of the tool to export the rows into a
format which understands the PostgreSQL's COPY command and got to know
that the import into PostgreSQL of the same data with COPY is 50 times
faster than with Perl::DBI, 2.5 minutes ./. 140 minutes for around 6
million rows into an empty table without indexes.

How can COPY do this so fast?

    matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub



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

Предыдущее
От: Steven Lembark
Дата:
Сообщение: Re: combination join against multiple tables
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: performance of loading CSV data with COPY is 50 times faster thanPerl::DBI