X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E9EF99DCB4C for ; Wed, 22 Feb 2006 05:09:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62725-06 for ; Wed, 22 Feb 2006 05:09:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from fafnir.androme.com (fafnir.androme.com [62.58.96.158]) by postgresql.org (Postfix) with ESMTP id 4433A9DCB5E for ; Wed, 22 Feb 2006 05:09:50 -0400 (AST) Received: by fafnir.androme.com (Postfix, from userid 1003) id F0397B91AE3; Wed, 22 Feb 2006 10:09:51 +0100 (CET) Message-ID: <43FC2A5E.4080601@andromeiberica.com> Date: Wed, 22 Feb 2006 10:09:50 +0100 From: Arnau Reply-To: arnaulist@andromeiberica.com User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org CC: tgl@sss.pgh.pa.us Subject: Re: Delete performance References: <1c66bda80602202302u2f6f6bc0jcfc3c728940ad2d0@mail.gmail.com> <15417.1140534087@sss.pgh.pa.us> In-Reply-To: <15417.1140534087@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.123 required=5 tests=[AWL=0.123] X-Spam-Score: 0.123 X-Spam-Level: X-Archive-Number: 200602/252 X-Sequence-Number: 20673 Hi all, > The usual cause of slow deletes is that (a) the table is the target of > some foreign key references from other large tables, and (b) the > referencing columns in those tables aren't indexed. This is a thing I don't understand, as far as I know the foreign keys references to primary keys and postgresql creates itself and index over the primary key, so those columns always should be indexed. Taking into account Tom's observation I'm missing something, could you explain it to all of us :) Thanks -- Arnau