Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 5016D2E0065 for ; Tue, 8 Apr 2008 00:02:05 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 41663-10 for ; Tue, 8 Apr 2008 00:01:20 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by developer.postgresql.org (Postfix) with ESMTP id 614AC2E0048 for ; Tue, 8 Apr 2008 00:01:19 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so466696ana.33 for ; Mon, 07 Apr 2008 20:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=LfFnOvyuHSgpJcaVjjRaJ1HXs4JUcACrqr9jxIm7q8A=; b=UJ2HKEClDCTwNeKOBF1Ed/jyuHz6ufcOo0h3NIFQC/eiitnkVBW0wYFUmDgs9yB7zvGCvGUx8VWmDDA6MvLbwf+7ap0bH6MeSeyUOfQFnHTEbLV8ECoujJszPahX+CCVewkooaEG9A+L7TCSHBHKcmALTsUJBEzzvQ4ijykIYyY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=rrdg1KTr4aXDk4OyStDEF7+dybXVQL5X/3Y5zn4kmVQojHQXY/aex+3u9sYzn4bV5M1Nz9Vyyi1LOiTiP6UFt0DQb4w8Lm99MVV3vVcu3kKXHJqH4+lYGgynfOUOTGgpPuAWwMxV8QcfTIzurMiH1aGhruh2tMPPH0keUow49pU= Received: by 10.100.251.13 with SMTP id y13mr11826458anh.97.1207623678148; Mon, 07 Apr 2008 20:01:18 -0700 (PDT) Received: by 10.100.48.8 with HTTP; Mon, 7 Apr 2008 20:01:18 -0700 (PDT) Message-ID: Date: Mon, 7 Apr 2008 23:01:18 -0400 From: "Christian Bourque" To: pgsql-performance@postgresql.org Subject: bulk insert performance problem MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/77 X-Sequence-Number: 29570 Hi, I have a performance problem with a script that does massive bulk insert in 6 tables. When the script starts the performance is really good but will degrade minute after minute and take almost a day to finish! I almost tried everything suggested on this list, changed our external raid array from raid 5 to raid 10, tweaked postgresql.conf to the best of my knowledge, moved pg_xlog to a different array, dropped the tables before running the script. But the performance gain was negligible even after all these changes... IMHO the hardware that we use should be up to the task: Dell PowerEdge 6850, 4 x 3.0Ghz Dual Core Xeon, 8GB RAM, 3 x 300GB SAS 10K in raid 5 for / and 6 x 300GB SAS 10K in raid 10 (MD1000) for PG data, the data filesystem is ext3 mounted with noatime and data=writeback. Running on openSUSE 10.3 with PostgreSQL 8.2.7. The server is dedicated for PostgreSQL... We tested the same script and schema with Oracle 10g on the same machine and it took only 2.5h to complete! What I don't understand is that with Oracle the performance seems always consistent but with PG it deteriorates over time... Any idea? Is there any other improvements I could do? Thanks Christian