Re: Index of a table is not used (in any case) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Index of a table is not used (in any case)
Date
Msg-id Pine.LNX.4.30.0110242342330.647-100000@peter.localdomain
Whole thread Raw
In response to Re: Index of a table is not used (in any case)  (mlw <markw@mohawksoft.com>)
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Compiling on Solaris with Sun compiler
Next
From: Peter Eisentraut
Date:
Subject: Re: CREATE OR REPLACE VIEW/TRIGGER