Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJL1n-0007Wf-B2 for pgsql-performance@arkaria.postgresql.org; Fri, 09 Jun 2017 14:36:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dJL1m-0006i6-PC for pgsql-performance@arkaria.postgresql.org; Fri, 09 Jun 2017 14:36:42 +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.84_2) (envelope-from ) id 1dJL1l-0006gV-Fj for pgsql-performance@postgresql.org; Fri, 09 Jun 2017 14:36:41 +0000 Received: from aart.rice.edu ([168.7.56.48]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJL1i-0006YI-CG for pgsql-performance@postgresql.org; Fri, 09 Jun 2017 14:36:39 +0000 Received: by aart.rice.edu (Postfix, from userid 18612) id DDF6F4069666; Fri, 9 Jun 2017 09:36:37 -0500 (CDT) Date: Fri, 9 Jun 2017 09:36:37 -0500 From: Kenneth Marshall To: Frits Jalvingh Cc: Andreas Kretschmer , pgsql-performance@postgresql.org Subject: Re: Improving PostgreSQL insert performance Message-ID: <20170609143637.GD26506@aart.rice.edu> References: <9e2a0a34-dd83-43af-d41a-791b34ff76e1@a-kretschmer.de> <20170609132857.GC26506@aart.rice.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On Fri, Jun 09, 2017 at 01:56:58PM +0000, Frits Jalvingh wrote: > Hi Kenneth, Andreas, > > Thanks for your tips! > > I increased shared_buffers to 8GB but it has no measurable effect at all. I > think that is logical: shared buffers are important for querying but not > for inserting; for that the speed to write to disk seems most important- no > big reason to cache the data if the commit requires a full write anyway. > I also changed the code to do only one commit; this also has no effect I > can see. > > It is true that Oracle had more memory assigned to it (1.5G), but unlike > Postgres (which is completely on a fast SSD) Oracle runs on slower disk > (ZFS).. > > I will try copy, but I first need to investigate how to use it- its > interface seems odd to say the least ;) I'll report back on that once done. > > Any other tips would be welcome! > > Regards, > > Frits Hi Frits, Here is an article that is still valid: https://www.depesz.com/2007/07/05/how-to-insert-data-to-database-as-fast-as-possible/ Regards, Ken -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance