Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL index usage discussion.

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostgreSQL index usage discussion.
Date: 2002-04-25 07:39:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, 2002-04-25 at 00:46, mlw wrote:
> We have had several threads about index usage, specifically when PostgreSQL has
> the choice of using one or not.
> There seems to be a few points of view:
> (1) The planner and statistics need to improve, so that erroneously using an
> index (or not) happens less frequently or not at all.
> (2) Use programmatic hints which allow coders specify which indexes are used
> during a query. (ala Oracle)
> (3) It is pretty much OK as-is, just use enable_seqscan=false in the query.
> My point of view is about this subject is one from personal experience. I had a
> database on which PostgreSQL would always (erroneously) choose not to use an
> index. Are my experiences typical? Probably not, but are experiences like it
> very common?

I have currently 2 databases that run with enable_seqscan=false to avoid
choosing plans that take forever.

> I don't know, but we see a number "Why won't PostgreSQL use my
> index" messages to at least conclude that it happens every now and then. In my
> experience, when it happens, it is very frustrating.
> I think statement (1) is a good idea, but I think it is optimistic to expect
> that a statistical analysis of a table will contain enough information for all
> possible cases.

Perhaps we can come up with some special rules to avoid grossly pessimal


In response to

pgsql-hackers by date

Next:From: Francois SuterDate: 2002-04-25 07:47:49
Subject: pid gets overwritten in OSX
Previous:From: Curt SampsonDate: 2002-04-25 07:28:51
Subject: Re: Sequential Scan Read-Ahead

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group