Re: Index of a table is not used (in any case)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Index of a table is not used (in any case)
Дата
Msg-id Pine.LNX.4.30.0110242342330.647-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Index of a table is not used (in any case)  (mlw <markw@mohawksoft.com>)
Список pgsql-hackers
mlw writes:

> The "not using index" was very frustrating to understand. The stock answer,
> "did you vacuum?" just isn't enough. There has to be some explanation (in the
> FAQ or something) about the indexed key distribution in your data.

Most "not using index" questions seem to be related to a misunderstanding
of users to the effect that "if there is an index it must be used, not
matter what the query", which is of course far from reality.  Add to that
the (related) category of inquiries from people that think the index ought
to be used but don't have any actual timings to show, you have a lot of
people that just need to be educated.

Of course the question "did you vacuum" (better, did you analyze) is
annoying, just as the requirement to analyze is annoying in the first
place, but unless someone designs a better query planner it will have to
do.  The reason why we always ask that question first is that people
invariantly have not analyzed.  A seasoned developer can often tell from
the EXPLAIN output whether ANALYZE has been done, but users cannot.
Perhaps something can be done in this area, but I'm not exactly sure what.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Compiling on Solaris with Sun compiler
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: CREATE OR REPLACE VIEW/TRIGGER