Re: optimizing import of large CSV file into partitioned table?

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Rick Casey <caseyrick(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: optimizing import of large CSV file into partitioned table?
Date: 2010-03-29 13:41:43
Message-ID: 877hovp7mw.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rick Casey <caseyrick(at)gmail(dot)com> writes:

> So, I am wondering if there is any to optimize this process? I have been using Postgres for several years, but have never had to partition or optimize it for files
> of this size until now. 
> Any comments or suggestions would be most welcomed from this excellent forum.

The pgloader tool will import your data as batches of N lines, you get
to say how many lines you want to consider in each transaction. Plus,
you can have more than one python thread importing your big file, either
sharing one writer and having the other threads doing the parsing and
COPY, or having N independent threads doing the reading/parsing/COPY.

http://pgloader.projects.postgresql.org/

Hope this helps,
--
dim

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Kohll - Mailing Lists 2010-03-29 13:47:57 Re: [pgsql-general] looking for a powerful frontend/teport generator
Previous Message A. Kretschmer 2010-03-29 13:33:34 Re: best practice in archiving CDR data