Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id CE0639FA0B9 for ; Fri, 6 Oct 2006 15:27:10 -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 03081-03 for ; Fri, 6 Oct 2006 15:27:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 548219FB3FE for ; Fri, 6 Oct 2006 15:27:05 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1GVuho-0001R5-Nb for pgsql-sql@postgresql.org; Fri, 06 Oct 2006 14:45:56 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 7012B3FAF; Fri, 6 Oct 2006 14:26:54 -0400 (EDT) Date: Fri, 6 Oct 2006 14:26:54 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Too much time to delete 19000 rows Message-ID: <20061006182654.GA11841@phlogiston.dyndns.org> References: <55c095e90610061110t5a3040c3pec05bd2c413a85dd@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55c095e90610061110t5a3040c3pec05bd2c413a85dd@mail.gmail.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/85 X-Sequence-Number: 26474 On Fri, Oct 06, 2006 at 03:10:01PM -0300, Ezequias Rodrigues da Rocha wrote: > > BEGIN WORK; > delete from base.ticket where session_id = 17 and cash_id = 99 and promo_id > = 5; > COMMIT WORK; Try putting EXPLAIN ANALYSE on the beginning to see what's going on. That said. . . > I just think it could be occuring becouse of many constraints (7 at all) . . .it could be, yes. Are all the other tables &c. indexed correctly? VACUUMed and ANALYSEd? A -- Andrew Sullivan | ajs@crankycanuck.ca The whole tendency of modern prose is away from concreteness. --George Orwell