Re: Index Performance Help - Mailing list pgsql-performance

From Greg Stark
Subject Re: Index Performance Help
Date
Msg-id 87d66rouoi.fsf@stark.xeocode.com
Whole thread Raw
In response to Index Performance Help  ("Damien Dougan" <damien.dougan@mobilecohesion.com>)
List pgsql-performance
"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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: single index on more than two coulumns a bad thing?
Next
From: Greg Stark
Date:
Subject: Re: single index on more than two coulumns a bad thing?