From: Greg Stark <gsstark@mit.edu>
To: Damien Dougan <damien.dougan@mobilecohesion.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Index Performance Help
Date: 01 Apr 2004 23:44:29 -0500
Message-ID: <87d66rouoi.fsf@stark.xeocode.com> (raw)
In-Reply-To: <004b01c3ebe1$7e0c9a70$7701a8c0@pestilence>
References: <004b01c3ebe1$7e0c9a70$7701a8c0@pestilence>
"Damien Dougan" <damien.dougan@mobilecohesion.com> writes:
> Sample analyze output for an initial query:
>
> hydradb=# explain analyze select * from pvsubscriber where actorid =
> 'b3432-asdas-232-Subscriber793500';
I take it pvsubscriber is a view? What's the definition of your view?
> -> Index Scan using mc_actor_key on mc_actor
> (cost=0.00..4.08 rows=1 width=69)
> (actual time=39.497..39.499 rows=1 loops=1)
Is this table regularly vacuumed? Is it possible it has lots of dead records
with this value for actorid? Try running vacuum full, or better "vacuum full
verbose" and keep the output, it might explain.
What version of postgres is this? You might try reindexing all your indexes
(but particularly this one). Older versions of postgres were prone to index
bloat problems.
--
greg
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: gsstark@mit.edu, damien.dougan@mobilecohesion.com
Subject: Re: Index Performance Help
In-Reply-To: <87d66rouoi.fsf@stark.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