Re: Unused indexes - PostgreSQL 9.2 - Mailing list pgsql-general

From Melvin Davidson
Subject Re: Unused indexes - PostgreSQL 9.2
Date
Msg-id CANu8FiyKeoecD2BrvvhvYudiGbZCJFvD1JoNhjdM7jdWAQs7Yw@mail.gmail.com
Whole thread Raw
In response to Re: Unused indexes - PostgreSQL 9.2  (Lucas Possamai <drum.lucas@gmail.com>)
Responses Re: Unused indexes - PostgreSQL 9.2
List pgsql-general



On Tue, May 10, 2016 at 5:06 PM, Lucas Possamai <drum.lucas@gmail.com> wrote:


My crystal ball is not working,  you have a PostgreSQL version?

Maybe you should have a look on the subject of this email...
 

in postgresql.conf are track_activities and track_counts both on?

yes
 

Did you ANALYZE the table after you re-added the index?

Yes

>Maybe you should have a look on the subject of this email...
Sorry, I was too busy looking at the content.

Has the size / # rows changed recently? If the planner thinks it can load all the rows faster, it will use a seqscan  regardless if you have an index.

If that is the case, you can force index use by doing a

SET enable_seqscan = off  

before executing the query.


--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

pgsql-general by date:

Previous
From: Lucas Possamai
Date:
Subject: Re: Unused indexes - PostgreSQL 9.2
Next
From: Lucas Possamai
Date:
Subject: Re: Unused indexes - PostgreSQL 9.2