Re: Load data from a csv file without using COPY - Mailing list pgsql-general

From Steve Atkins
Subject Re: Load data from a csv file without using COPY
Date
Msg-id E483F41A-31A6-450D-9BE7-97AC0294BCD3@blighty.com
Whole thread Raw
In response to Load data from a csv file without using COPY  (Ravi Krishna <srkrishna@yahoo.com>)
Responses Re: Load data from a csv file without using COPY  (Ravi Krishna <srkrishna@yahoo.com>)
List pgsql-general
> 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



pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Is postorder tree traversal possible with recursive CTE's?
Next
From: Alban Hertroys
Date:
Subject: Re: Load data from a csv file without using COPY