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

Re: Indexes not used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "D(dot) Duccini" <duccini(at)backpack(dot)com>
Cc: David Olbersen <dave(at)slickness(dot)org>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Indexes not used
Date: 2001-03-16 16:09:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
"D. Duccini" <duccini(at)backpack(dot)com> writes:
> Maybe I'm not getting something here...but how is a sequential scan EVER
> faster than a B-tree / index lookup on a database with over 500,000
> records?

If the system needs to fetch more than a small percentage of the
records, then seqscan *will* be faster.  The issue you are dealing
with seems to be misestimation of the retrieval percentage for this
particular query, causing the planner to guess wrong about which
kind of plan to use.

			regards, tom lane

In response to


pgsql-novice by date

Next:From: D. DucciniDate: 2001-03-16 16:18:45
Subject: Re: Indexes not used
Previous:From: D. DucciniDate: 2001-03-16 14:26:14
Subject: Re: Indexes not used

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