pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Atkins <steve@blighty.com>
To: PG mailing List <pgsql-general@lists.postgresql.org>
Subject: Re: Load data from a csv file without using COPY
Date: Tue, 19 Jun 2018 22:09:22 +0100
Message-ID: <E483F41A-31A6-450D-9BE7-97AC0294BCD3@blighty.com> (raw)
In-Reply-To: <AE89FBE5-B726-4108-925F-449E34D24651@yahoo.com>
References: <AE89FBE5-B726-4108-925F-449E34D24651@yahoo.com>


> On Jun 19, 2018, at 9:16 PM, Ravi Krishna <srkrishna@yahoo.com> wrote:
> 
> In order to test a real life scenario (and use it for benchmarking) I want to load large number of data from csv files.  
> The requirement is that the load should happen like an application writing to the database ( that is, no COPY command). 
> Is there a tool which can do the job.  Basically parse the csv file and insert it to the database row by row.

If performance is relevant then your app should probably be using COPY protocol, not line by line inserts. It's
supported by most postgresql access libraries. If your app does that then using "\copy" from psql would be
an appropriate benchmark.

Cheers,
  Steve





view thread (29+ messages)  latest in thread

Message-ID: <E483F41A-31A6-450D-9BE7-97AC0294BCD3@blighty.com>
Permalink:  ../E483F41A-31A6-450D-9BE7-97AC0294BCD3@blighty.com/
Also on:    postgresql.org/message-id/E483F41A-31A6-450D-9BE7-97AC0294BCD3@blighty.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: steve@blighty.com
  Subject: Re: Load data from a csv file without using COPY
  In-Reply-To: <E483F41A-31A6-450D-9BE7-97AC0294BCD3@blighty.com>
  References: <AE89FBE5-B726-4108-925F-449E34D24651@yahoo.com> <E483F41A-31A6-450D-9BE7-97AC0294BCD3@blighty.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox