Re: Seq. scan when using comparison operators, why?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Bill Gribble <grib(at)linuxdevel(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Seq. scan when using comparison operators, why?
Date: 2002-04-08 18:08:49
Message-ID: 20020408110513.M77664-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8 Apr 2002, Bill Gribble wrote:

> On Mon, 2002-04-08 at 07:45, Martijn van Oosterhout wrote:
> > "Properly" in your opinion. It's more likely that postgres has a better idea
> > of which one is faster...
>
> This seems to be the standard response to any message questioning the
> query planner's strategy.

Perhaps you missed the part of his message where he asks for more
information and gives a short reason why it *might* be choosing
sequence scan?

(quoted from Martijn's message)
"How many rows are there in the table? If you're going to match most of
the table, it's faster to scan the entire table than it is the scan the
index."

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Darren Ferguson 2002-04-08 18:12:31 Re: Tcl_CreateSlave error (pg 7.1.2, RH 7.2)
Previous Message Jeffrey W. Baker 2002-04-08 18:03:09 Re: more about pg_toast growth