Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DAE749FB29F for ; Fri, 6 Oct 2006 15:27:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 02305-06 for ; Fri, 6 Oct 2006 15:27:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id B992D9FA6BB for ; Fri, 6 Oct 2006 15:27:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k96IRLWP004247; Fri, 6 Oct 2006 14:27:21 -0400 (EDT) To: "Ezequias Rodrigues da Rocha" cc: pgsql-sql@postgresql.org Subject: Re: Too much time to delete 19000 rows In-reply-to: <55c095e90610061110t5a3040c3pec05bd2c413a85dd@mail.gmail.com> References: <55c095e90610061110t5a3040c3pec05bd2c413a85dd@mail.gmail.com> Comments: In-reply-to "Ezequias Rodrigues da Rocha" message dated "Fri, 06 Oct 2006 15:10:01 -0300" Date: Fri, 06 Oct 2006 14:27:21 -0400 Message-ID: <4246.1160159241@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.092 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/86 X-Sequence-Number: 26475 "Ezequias Rodrigues da Rocha" writes: > The selection takes less than 1 second but on delete I wait more than 4 > minutes and notthing. Can someone tell me what could happen ? Perhaps foreign keys referencing this table and no indexes on the referencing columns? You're not required to have an index on the referencing side, but you pay for it when you update or delete in the master table... regards, tom lane