X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 142853A62C2 for ; Mon, 13 Dec 2004 17:50:36 +0000 (GMT) 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 08593-02 for ; Mon, 13 Dec 2004 17:50:25 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 730DA3A630B for ; Mon, 13 Dec 2004 17:50:23 +0000 (GMT) Received: (qmail 9451 invoked by uid 500); 13 Dec 2004 18:03:03 -0000 Date: Mon, 13 Dec 2004 12:03:03 -0600 From: Bruno Wolff III To: Alvaro Nunes Melo Cc: PostgreSQL - SQL Subject: Re: Similar tables, different indexes performance Message-ID: <20041213180303.GA8830@wolff.to> Mail-Followup-To: Alvaro Nunes Melo , PostgreSQL - SQL References: <1102958269.5855.29.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1102958269.5855.29.camel@localhost> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/88 X-Sequence-Number: 19708 On Mon, Dec 13, 2004 at 15:17:49 -0200, Alvaro Nunes Melo wrote: > db=> SELECT COUNT(*) FROM titulo WHERE cd_pessoa = 1; > count > ------- > 220 > (1 record) > > Time: 48,762 ms > db=> SELECT COUNT(*) FROM movimento WHERE cd_pessoa = 1; > count > ------- > 221 > (1 record) > > Time: 1158,463 ms I suspect you have a lot of dead tuples in those tables. Have you vacuumed them recently? Was there enough FSM space when you did so? You might try doing VACUUM FULL on each table now and see if that fixes the problem.