Re: queries stop using indexes

From: Ragnar <gnari(at)hive(dot)is>
To: Jonathan Vanasco <postgres(at)2xlp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: queries stop using indexes
Date: 2007-04-02 11:40:53
Message-ID: 1175514053.1153.97.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2007-04-02 11:44:22 Re: Tsearch2 crashes my backend, ouch !
Previous Message Guillaume Bog 2007-04-02 11:39:26 A little help for big forms