Re: Load data from a csv file without using COPY

From: Steve Atkins <steve(at)blighty(dot)com>
To: PG mailing List <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Load data from a csv file without using COPY
Date: 2018-06-19 21:09:22
Message-ID: E483F41A-31A6-450D-9BE7-97AC0294BCD3@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> On Jun 19, 2018, at 9:16 PM, Ravi Krishna <srkrishna(at)yahoo(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2018-06-19 21:10:04 Re: Load data from a csv file without using COPY
Previous Message Alban Hertroys 2018-06-19 21:05:19 Re: Is postorder tree traversal possible with recursive CTE's?