Re: Forcing query to use an index

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Forcing query to use an index
Дата
Msg-id 200303031521.48013.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Forcing query to use an index  (Michael Nachbaur <mike@nachbaur.com>)
Ответы Re: Forcing query to use an index  (Michael Nachbaur <mike@nachbaur.com>)
Список pgsql-sql
Micheal,

Don't forget to run ANALYZE as well; this does not require a table lock.

> Does using "set enable_seqscan = off" impact anything else on the
> system, or is it connection-specific?  Is this the recommended way of
> doing this, or is there another way of coercing Postgres into using
> indexes?  I'm making these queries from Perl code running in an XSP
> page, so I'm not sure how flexible this option would be from a
> developer point of view.

Setting enable_seqscan=off is just for testing purposes, to see if the planner
is making a wrong decision so that you can adjust your .conf params, query,
and/or indexes to suit.  The setting is *not* intended as a production
solution.

--
-Josh BerkusAglio Database SolutionsSan Francisco



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

Предыдущее
От: Michael Nachbaur
Дата:
Сообщение: Re: Forcing query to use an index
Следующее
От: Michael Nachbaur
Дата:
Сообщение: Re: Forcing query to use an index