X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id EA1C2D1B4E6 for ; Thu, 20 Nov 2003 22:59:23 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 30763-01 for ; Thu, 20 Nov 2003 18:58:48 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id F20CED1B4F4 for ; Thu, 20 Nov 2003 18:58:45 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hAKMwe19007440; Thu, 20 Nov 2003 17:58:40 -0500 (EST) To: stephen farrell Cc: pgsql-performance@postgresql.org Subject: Re: Problem with insert into select... In-reply-to: <3FBD2D8B.8020509@almaden.ibm.com> References: <3FBD2D8B.8020509@almaden.ibm.com> Comments: In-reply-to stephen farrell message dated "Thu, 20 Nov 2003 13:09:31 -0800" Date: Thu, 20 Nov 2003 17:58:40 -0500 Message-ID: <7439.1069369120@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/181 X-Sequence-Number: 4741 stephen farrell writes: > I'm having a problem with a queyr like: INSERT INTO FACT (x,x,x,x,x,x) > SELECT a.key,b.key,c.key,d.key,e.key,f.key from x,a,b,c,d,e,f where x=a > and x=b .... -- postgres7.4 is running out of memory. I'm not sure > why this would happen -- does it buffer the subselect before doing the > insert? What does EXPLAIN show for the query? And we need to see the exact query and table definitions, not abstractions. regards, tom lane