Re: populating a table via the COPY command using C code.

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: "Mak, Jason" <jason(dot)mak(at)ngc(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: populating a table via the COPY command using C code.
Date: 2005-04-27 21:05:20
Message-ID: b834fcb8af6c3766c66163ef51c92180@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Apr 27, 2005, at 4:48 PM, Mak, Jason wrote:

> What's your thoughts?? which approach would be the fastest?
> 1) 2 step process.
> 2) realtime PQputCopyData - not sure how this would work with 3
> different tables.
> 3) COPY tablename FROM 'filename'
>
> thanks,
> jason.

COPY tablename FROM 'filename'

is VERY fast. Generally, I think people generally load the data into
postgres using COPY (perhaps into a "loader" table that isn't in the
same format that the final tables will be in) and then do data
manipulation and cleaning within the database using database tools.
This paradigm may or may not work for you, but it seems to be pretty
general.

Sean

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Caduto 2005-04-27 21:09:55 Re: Serial / auto increment data type
Previous Message Scott Marlowe 2005-04-27 20:52:47 Re: Serial / auto increment data type