From: Bruno Wolff III <bruno@wolff.to>
To: Alvaro Nunes Melo <al_nunes@atua.com.br>
Cc: PostgreSQL - SQL <pgsql-sql@postgresql.org>
Subject: Re: Similar tables, different indexes performance
Date: Mon, 13 Dec 2004 12:03:03 -0600
Message-ID: <20041213180303.GA8830@wolff.to> (raw)
In-Reply-To: <1102958269.5855.29.camel@localhost>
References: <1102958269.5855.29.camel@localhost>
On Mon, Dec 13, 2004 at 15:17:49 -0200,
Alvaro Nunes Melo <al_nunes@atua.com.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bruno@wolff.to, al_nunes@atua.com.br
Subject: Re: Similar tables, different indexes performance
In-Reply-To: <20041213180303.GA8830@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox