X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3B23BD1B387 for ; Tue, 20 Jul 2004 16:59:47 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99177-07 for ; Tue, 20 Jul 2004 19:59:45 +0000 (GMT) Received: from pillette.com (adsl-67-119-5-202.dsl.snfc21.pacbell.net [67.119.5.202]) by svr1.postgresql.org (Postfix) with ESMTP id 8CC31D1B344 for ; Tue, 20 Jul 2004 16:59:40 -0300 (ADT) Received: (from andrew@localhost) by pillette.com (8.11.6/8.11.6) id i6KJxe908906; Tue, 20 Jul 2004 12:59:40 -0700 Date: Tue, 20 Jul 2004 12:59:40 -0700 From: andrew@pillette.com Message-Id: <200407201959.i6KJxe908906@pillette.com> Subject: Re: Unbearably slow cascading deletes To: Stephan Szabo Cc: pgsql-performance@postgresql.org X-Originating-IP: 192.168.1.11 X-Mailer: Webmin 0.940 MIME-Version: 1.0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=NO_REAL_NAME, UPPERCASE_25_50 X-Spam-Level: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Archive-Number: 200407/136 X-Sequence-Number: 7527 PREPARE c(int4) AS DELETE FROM childtable WHERE fk=$1; EXPLAIN EXECUTE c(-1); gives an index scan. PREPARE c2(int4) AS DELETE FROM parenttable WHERE key=$1; EXPLAIN EXECUTE c2(1); gives a seq scan on the parent table (itself a little curious) and no explanation of what the triggers are doing.