Re: queries stop using indexes - Mailing list pgsql-general

From Ragnar
Subject Re: queries stop using indexes
Date
Msg-id 1175514053.1153.97.camel@localhost.localdomain
Whole thread Raw
In response to queries stop using indexes  (Jonathan Vanasco <postgres@2xlp.com>)
Responses Re: queries stop using indexes
List pgsql-general
On lau, 2007-03-31 at 18:51 -0400, Jonathan Vanasco wrote:
> I have a table with 15 cols , there is an joint index on 5 of them
>
> there are ~15million records in the table, and it gets heavy  use via
> update & insert
>
> i recently noticed that after a day of use, the index is no longer
> being respected in some/all queries and a seq scan on the table is used
>
> i ran analyze, no change.
> i ran vacuum analyze, no change.
>
> i dropped the index, and recreated it -- its now used again.

if you analyze the table after recreating the index, does it then stop
using it?

possibly you need to increase statistic targets on some or all
of the index columns.

a EXPLAIN ANALYZE could help figuring this out.

gnari



pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: use superuser connection from php
Next
From: "Guillaume Bog"
Date:
Subject: A little help for big forms