Thread: Problem with insert into select...
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? Things are pretty big scale: 3gb ram, 32768 shared buffers, 700gb disk, millions of rows in the tables.
On Thursday 20 November 2003 21:04, stephen farrell wrote: > 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. When this has happened to me it's always been because I've got an unconstrained join due to pilot error. Try an EXPLAIN on the select part and see if that pops up anything. -- Richard Huxton Archonet Ltd