Re: [ADMIN] Index not used. WHY?

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: [ADMIN] Index not used. WHY?
Дата
Msg-id 3FD04457.6000504@myrealbox.com
обсуждение исходный текст
Ответ на Re: [ADMIN] Index not used. WHY?  ("Andrei Bintintan" <klodoma@ar-sd.net>)
Список 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 по дате отправления:

Предыдущее
От: "Andrei Bintintan"
Дата:
Сообщение: Re: [ADMIN] Index not used. WHY?
Следующее
От: Thierry Missimilly
Дата:
Сообщение: Re: tuning questions