Re: Load data from a csv file without using COPY

2018-06-25 Thread Adrian Klaver
On 06/25/2018 09:17 AM, Kevin Brannen wrote: From: Ravi Krishna [mailto:srkris...@yahoo.com] Sent: Tuesday, June 19, 2018 4:15 PM To: Steve Atkins Cc: PG mailing List Subject: Re: Load data from a csv file without using COPY If performance is relevant then your app should probably be using

RE: Load data from a csv file without using COPY

2018-06-25 Thread Kevin Brannen
From: Ravi Krishna [mailto:srkris...@yahoo.com] Sent: Tuesday, June 19, 2018 4:15 PM To: Steve Atkins Cc: PG mailing List Subject: Re: Load data from a csv file without using COPY > > If performance is relevant then your app should probably be using COPY > protocol, not line by lin

Re: Load data from a csv file without using COPY

2018-06-20 Thread Adrian Klaver
On 06/19/2018 04:20 PM, Ravi Krishna wrote: Thanks all for replying.  I see that I did not explain my requirement in detail.  So let me explain it in detail. 1. Currently we have a legacy app running in DB2/LUW. Application writes to it either via Java program     or uses a custom ETL

Re: Load data from a csv file without using COPY

2018-06-19 Thread Michael Paquier
On Tue, Jun 19, 2018 at 02:32:10PM -0700, David G. Johnston wrote: > ​You really need to describe what you consider to be a "real life​ > scenario"; and probably give a better idea of creation and number of these > csv files. In addition to describing the relevant behavior of the > application

Re: Load data from a csv file without using COPY

2018-06-19 Thread Ravi Krishna
Thanks all for replying. I see that I did not explain my requirement in detail. So let me explain it in detail. 1. Currently we have a legacy app running in DB2/LUW. Application writes to it either via Java program or uses a custom ETL scripts using a vendor product. 2. We want to

Re: Load data from a csv file without using COPY

2018-06-19 Thread Adrian Klaver
On 06/19/2018 01:16 PM, Ravi Krishna 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

Re: Load data from a csv file without using COPY

2018-06-19 Thread Stephen Frost
Greetings, * Adrian Klaver (adrian.kla...@aklaver.com) wrote: > On 06/19/2018 03:18 PM, Asif Ali wrote: > >just tell me the site , i dont have time to waste on shitty things , i > >will program a spammer to send email to this list > > So why subscribe in the first place? Thanks for the attempts

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
Subject: Re: Load data from a csv file without using COPY It's people like you who make spam filters worse for the rest of us to the point they need to be checked daily for false positives. I'm sure you could have found it in less time than it took to spam the list with obscenities. On June 19

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
Subject: Re: Load data from a csv file without using COPY It's people like you who make spam filters worse for the rest of us to the point they need to be checked daily for false positives. I'm sure you could have found it in less time than it took to spam the list with obscenities. On June 19

Re: Load data from a csv file without using COPY

2018-06-19 Thread Adrian Klaver
*From:* James Keener *Sent:* Wednesday, June 20, 2018 3:11 AM *To:* pgsql-general@lists.postgresql.org; Asif Ali; Alban Hertroys; Ravi Krishna *Cc:* PG mailing List *Subject:* Re: Load data from a csv file without using COPY Seriously, stop spamming the list

Re: Load data from a csv file without using COPY

2018-06-19 Thread James Keener
l-general@lists.postgresql.org; Asif Ali; Alban Hertroys; Ravi >Krishna >Cc: PG mailing List >Subject: Re: Load data from a csv file without using COPY > >Seriously, stop spamming the list and stop cursing and acting like a >petulant child. Go to the site and unsubscribe or use a

Re: Load data from a csv file without using COPY

2018-06-19 Thread David G. Johnston
t > > Bye > > -- > *From:* James Keener > *Sent:* Wednesday, June 20, 2018 3:11 AM > *To:* pgsql-general@lists.postgresql.org; Asif Ali; Alban Hertroys; Ravi > Krishna > *Cc:* PG mailing List > *Subject:* Re: Load data from a csv file without using COPY > &g

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
@lists.postgresql.org; Asif Ali; Alban Hertroys; Ravi Krishna Cc: PG mailing List Subject: Re: Load data from a csv file without using COPY Seriously, stop spamming the list and stop cursing and acting like a petulant child. Go to the site and unsubscribe or use a mail client that understands the standard

Re: Load data from a csv file without using COPY

2018-06-19 Thread James Keener
ore than 100 >emails a day > >Bye > > >From: Alban Hertroys >Sent: Wednesday, June 20, 2018 2:10 AM >To: Ravi Krishna >Cc: PG mailing List >Subject: Re: Load data from a csv file without using COPY > > >> On 19 Jun 2018,

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
how the fuck i unsubscribe to this mailing list , i get more than 100 emails a day Bye From: Alban Hertroys Sent: Wednesday, June 20, 2018 2:10 AM To: Ravi Krishna Cc: PG mailing List Subject: Re: Load data from a csv file without using COPY > On 19 Jun 2

Re: Load data from a csv file without using COPY

2018-06-19 Thread Asif Ali
how the fuck i unsubscribe to this mailing list , i get more than 100 emails a day From: Tim Cross Sent: Wednesday, June 20, 2018 2:59 AM To: Ravi Krishna Cc: PG mailing List Subject: Re: Load data from a csv file without using COPY Ravi Krishna writes

Re: Load data from a csv file without using COPY

2018-06-19 Thread Tim Cross
Ravi Krishna writes: > 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

Re: Load data from a csv file without using COPY

2018-06-19 Thread David G. Johnston
On Tue, Jun 19, 2018 at 2:17 PM, Ravi Krishna wrote: > > > > I think an easy approach would be to COPY the CSV files into a separate > database using psql's \copy command and then pg_dump that as separate > insert statements with pg_dump —inserts. > > > > This was my first thought too. However,

Re: Load data from a csv file without using COPY

2018-06-19 Thread Rob Sargent
On 06/19/2018 03:14 PM, Ravi Krishna wrote: 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.

Re: Load data from a csv file without using COPY

2018-06-19 Thread Steve Atkins
> On Jun 19, 2018, at 10:14 PM, Ravi Krishna wrote: > >> >> 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 >>

Re: Load data from a csv file without using COPY

2018-06-19 Thread Ravi Krishna
> > I think an easy approach would be to COPY the CSV files into a separate > database using psql's \copy command and then pg_dump that as separate insert > statements with pg_dump —inserts. > This was my first thought too. However, as I understand, pg_dump --insert basically runs INSERT

Re: Load data from a csv file without using COPY

2018-06-19 Thread Ravi Krishna
> > 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. Actually the reluctance to not use

Re: Load data from a csv file without using COPY

2018-06-19 Thread Alban Hertroys
> On 19 Jun 2018, at 22:16, Ravi Krishna 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

Re: Load data from a csv file without using COPY

2018-06-19 Thread Steve Atkins
> On Jun 19, 2018, at 9:16 PM, Ravi Krishna 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

Re: Load data from a csv file without using COPY

2018-06-19 Thread David G. Johnston
On Tue, Jun 19, 2018 at 1:16 PM, Ravi Krishna 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

Re: Load data from a csv file without using COPY

2018-06-19 Thread Hans Schou
On Tue, Jun 19, 2018 at 10:17 PM Ravi Krishna 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

Re: Load data from a csv file without using COPY

2018-06-19 Thread Nicolas Paris
hi AFAIK you can use copy from a jdbc command since copy allows to stream data (from stdin version) However while faster than INSERT INTO, this might lock the target table during the process 2018-06-19 22:16 GMT+02:00 Ravi Krishna : > In order to test a real life scenario (and use it for

Load data from a csv file without using COPY

2018-06-19 Thread Ravi Krishna
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