Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XJFZN-0004W9-RL for pgsql-sql@arkaria.postgresql.org; Mon, 18 Aug 2014 05:33:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XJFZN-0001ld-6D for pgsql-sql@arkaria.postgresql.org; Mon, 18 Aug 2014 05:33:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XJFZK-0001lS-Vl for pgsql-sql@postgresql.org; Mon, 18 Aug 2014 05:33:23 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XJFZH-0003us-Cr for pgsql-sql@postgresql.org; Mon, 18 Aug 2014 05:33:20 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XJFZG-0003jB-5t for pgsql-sql@postgresql.org; Sun, 17 Aug 2014 22:33:18 -0700 Date: Sun, 17 Aug 2014 22:33:18 -0700 (PDT) From: gmb To: pgsql-sql@postgresql.org Message-ID: <1408339998171-5815175.post@n5.nabble.com> In-Reply-To: References: <1408260946918-5815108.post@n5.nabble.com> <1408272021571-5815111.post@n5.nabble.com> <1408304846514-5815126.post@n5.nabble.com> Subject: Re: High memory usage / performance issue ( temp tables ? ) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Thanks for the replies. I tried a couple of alternative methods over the weekend in the hope of improving performance, but unfortunately to no avail. One of these was to have the processing of the 500K xml files shared between multiple threads ( multiple connections ). In an attempt to "force" the dropping of the temp tables , each thread creates its own connection, run the function with XML payload and the disconnects. The impression I got was that the avg time per transaction still increases as the process progresses. My one concern with this method was locking , which I'm unfortunately quite unfamiliar with. Is it possible that locking could be a key problem when following this multi-thread approach ? Regards gmb -- View this message in context: http://postgresql.1045698.n5.nabble.com/High-memory-usage-performance-issue-temp-tables-tp5815108p5815175.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql