Re: [ADMIN] Index not used. WHY? - Mailing list pgsql-performance

From Shridhar Daithankar
Subject Re: [ADMIN] Index not used. WHY?
Date
Msg-id 3FD04457.6000504@myrealbox.com
Whole thread Raw
In response to Re: [ADMIN] Index not used. WHY?  ("Andrei Bintintan" <klodoma@ar-sd.net>)
List pgsql-performance
Andrei Bintintan wrote:

> There are around 700 rows in this table.
> If I set enable_seqscan=off then the index is used and I also used Vacuum
> Analyze recently.

For 700 rows I think seq. would work best.
>
> I find it strange because the number of values of id_user and id_modull are
> somehow in the same distribution and when I search the table the id_user
> index is used but the id_modull index is not used.
>
> Does somehow postgre know that a seq scan runs faster in this case as a
> index scan? Should I erase this index?
> I have to say that the data's in this table are not changed offen, but there
> are a LOT of joins made with this table.

If table is cached then it does not matter. Unless it grows substantially, say
to around hundred thousand rows(Note your table is small), idex wouldn't be that
useful.

  Shridhar


pgsql-performance by date:

Previous
From: "Andrei Bintintan"
Date:
Subject: Re: [ADMIN] Index not used. WHY?
Next
From: Thierry Missimilly
Date:
Subject: Re: tuning questions