Re: Similar tables, different indexes performance

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Alvaro Nunes Melo <al_nunes(at)atua(dot)com(dot)br>
Cc: PostgreSQL - SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Similar tables, different indexes performance
Date: 2004-12-13 18:03:03
Message-ID: 20041213180303.GA8830@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance pgsql-sql

On Mon, Dec 13, 2004 at 15:17:49 -0200,
Alvaro Nunes Melo <al_nunes(at)atua(dot)com(dot)br> 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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2004-12-13 18:20:14 Re: Alternatives to Dell?
Previous Message Joshua D. Drake 2004-12-13 17:23:13 Re: Hardware purchase question

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Nunes Melo 2004-12-13 19:32:02 Re: Similar tables, different indexes performance
Previous Message Alvaro Nunes Melo 2004-12-13 17:17:49 Similar tables, different indexes performance