Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-performancepgsql-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

pgsql-performance by date

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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group