Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVNsh-0006NL-Ng for pgsql-general@arkaria.postgresql.org; Tue, 19 Jun 2018 21:09:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVNsg-0007A1-8I for pgsql-general@arkaria.postgresql.org; Tue, 19 Jun 2018 21:09:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVNsf-00079m-TC for pgsql-general@lists.postgresql.org; Tue, 19 Jun 2018 21:09:38 +0000 Received: from mail.wordtothewise.com ([184.105.179.154]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVNsZ-00044a-6i for pgsql-general@lists.postgresql.org; Tue, 19 Jun 2018 21:09:36 +0000 Received: from [192.168.0.88] (unknown [37.228.233.165]) by mail.wordtothewise.com (Postfix) with ESMTPSA id A276A2338C for ; Tue, 19 Jun 2018 14:10:32 -0700 (PDT) From: Steve Atkins Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Load data from a csv file without using COPY Date: Tue, 19 Jun 2018 22:09:22 +0100 References: To: PG mailing List In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jun 19, 2018, at 9:16 PM, Ravi Krishna wrote: >=20 > In order to test a real life scenario (and use it for benchmarking) I = want to load large number of data from csv files. =20 > The requirement is that the load should happen like an application = writing to the database ( that is, no COPY command).=20 > 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