|
|||||||||||
|
Re: [PERFORM] 8.3rc1 Out of memory when performing update
From: Stephen Denne <Stephen.Denne(at)datamail.co.nz>
Date: Thu Jan 24 2008 - 22:20:49 EST
No triggers on that table, one primary key, one foreign key, two indexes.
The foreign key references a primary key which is also an integer.
No other tables which reference document_file.
No inherited tables.
I altered the update statement slightly, and reran the query. I disabled autovacuum after a while and cancelled the autovacuum process that was trying to vacuum analyze document_file. The altered query has been running over 3 hours now, without using lots of memory (38M private bytes). 2046 temp files were created (2.54GB worth), which have recently changed from slowly growing in size to very very slowly reducing in number.
Altered query that has not crashed:
Hash Join (cost=674810.80..6701669.63 rows=16972702 width=621)
Hash Cond: (df.document_id = d.id)
-> Seq Scan on document d (cost=0.00..396352.02 rows=16972702 width=8)
c.f. original (re-explained):
Seq Scan on document_file (cost=0.00..281183329.64 rows=27702834 width=617)
SubPlan
Index Cond: (id = $0) Schema as reported by pgadmin:
CREATE TABLE document_file
mime_type character varying(255), file_name character varying(255) NOT NULL, life_cycle_status character varying(255),version integer DEFAULT 0, is_current boolean DEFAULT true, file_size integer NOT NULL,
document_type_id integer,
CONSTRAINT pk_document_file_id PRIMARY KEY (id),
CONSTRAINT fk_document_id FOREIGN KEY (document_id)
REFERENCES document (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE CASCADE
)
WITH (OIDS=FALSE); ALTER TABLE document_file OWNER TO postgres; GRANT ALL ON TABLE document_file TO postgres; GRANT ALL ON TABLE document_file TO vapps; GRANT ALL ON TABLE document_file TO vrconfig;
CREATE INDEX location_ix
CREATE INDEX tc_file_document
Disclaimer:
This email has been scanned by the DMZGlobal Business Quality Electronic Messaging Suite. Please see http://www.dmzglobal.com/services/bqem.htm for details. ---------------------------(end of broadcast)---------------------------TIP 5: don't forget to increase your free space map settings Received on Thu Jan 24 22:36:26 2008 This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 16:18:30 EDT |
||||||||||
|
|||||||||||