Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0G5DnV07549 for ; Wed, 16 Jan 2002 00:13:49 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 3E1E9D5E5; Tue, 15 Jan 2002 21:13:49 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 2FBC25BF4; Tue, 15 Jan 2002 21:13:49 -0800 (PST) Date: Tue, 15 Jan 2002 21:13:49 -0800 (PST) From: Stephan Szabo To: Jeff Boes Cc: Subject: Re: Long-running DELETE In-Reply-To: Message-ID: <20020115211207.I39844-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200201/174 X-Sequence-Number: 6260 On 15 Jan 2002, Jeff Boes wrote: > Okay, this is really starting to fry me: > > I'm trying to delete 1000 rows from a table which is referenced by > several different other tables as a foreign key. I've turned on > debug_print_query to help track this down. When I do deletes from > some tables, I can delete hundreds of rows per second. When I delete > from the main table, it's about 1 row per second. I've turned off > every trigger in the database: > > update pg_triggers set tgenabled=false; I don't think tgenabled works. You'll probably need to set reltriggers to 0 on the pg_class row for the table (and then reset it to the correct value afterwards).