From: Gregory Stark <stark@enterprisedb.com>
To: Gauri Kanekar <meetgaurikanekar@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance Problem
Date: Tue, 05 Jun 2007 14:32:33 +0100
Message-ID: <87lkeycyry.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <7e4ba9550706050253o5d7048c3vbe755eb7fc85d298@mail.gmail.com>
References: <7e4ba9550706050226u7c2aa291he77dbfbeb90ce815@mail.gmail.com>
<7e4ba9550706050253o5d7048c3vbe755eb7fc85d298@mail.gmail.com>
"Gauri Kanekar" <meetgaurikanekar@gmail.com> writes:
> Befor doing vaccum full on the database this query use to take less
> than 4min. But now after doing vacumming reindexing the tables it is
> taking 73mins.
Vacuum full is generally not necessary. You do need to ensure regular vacuum
is run frequently on heavily updated tables though.
> After observing the explain analyse it seems like it is not selecting
> the required index properly.
>
> So can anybody suggest any thing??
-> Bitmap Index Scan on campaign_attributes_pk (cost=0.00..105.83 rows=60 width=0) (actual time=1.721..1.721 rows=1279 loops=1)
When's the last time you analyzed your tables? Postgres is guessing it'll find
60 rows and instead finding over a thousands rows...
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
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-performance@postgresql.org
Cc: stark@enterprisedb.com, meetgaurikanekar@gmail.com
Subject: Re: Performance Problem
In-Reply-To: <87lkeycyry.fsf@oxford.xeocode.com>
* 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