Re: Performance Problem

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Gauri Kanekar" <meetgaurikanekar(at)gmail(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance Problem
Date: 2007-06-05 13:32:33
Message-ID: 87lkeycyry.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Gauri Kanekar" <meetgaurikanekar(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Markus Schiltknecht 2007-06-05 14:16:30 Re: dbt2 NOTPM numbers
Previous Message Steinar H. Gunderson 2007-06-05 13:16:45 Re: Performance Problem