Re: Not using index

Поиск
Список
Период
Сортировка
От Shridhar Daithankar
Тема Re: Not using index
Дата
Msg-id 402B3757.8010309@frodo.hserus.net
обсуждение исходный текст
Ответ на Not using index  ("Bas Scheffers" <bas@scheffers.net>)
Список pgsql-general
Bas Scheffers wrote:
> Then I discovered "set enable_seqscan to off". It started using the index
> again. This is certainly not a case of it not being beneficial to use the
> index; using the index drops the query time from 260ms to 36ms!
>
> In most references I have seen, setting enable_seqscan to off is something
> only to be done for testing. But obviously if Postgres doesn't start
> behaving properly, I can't go to production without it. Is this the case
> or do many use this feature in production?
>
> Can you give Postgres index hints like you can do in Oracle and Sybase?

What is the exact query and table schema?

Are you sure it is not problem of cross data-types in where clause and indexes?

Postgresql uses indexes if it sees fit. Usually it is a better choice to let it
decide what it wants.

  Shridhar

В списке pgsql-general по дате отправления:

Предыдущее
От: "Bas Scheffers"
Дата:
Сообщение: Not using index
Следующее
От: JM
Дата:
Сообщение: Migrating 7.1.3 to 7.3.4 problem