Re: Why sequential scan when there's a supporting index?

From: "Joshua b(dot) Jore" <josh(at)greentechnologist(dot)org>
To:
Cc: PgSQL Novice ML <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Why sequential scan when there's a supporting index?
Date: 2002-05-25 16:57:39
Message-ID: Pine.BSO.4.44.0205251147450.15363-100000@kitten.greentechnologist.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 25 May 2002, Ron Johnson wrote:
> On Sat, 2002-05-25 at 03:52, Andrew McMillan wrote:
> > On Sat, 2002-05-25 at 02:25, Ron Johnson wrote:
> > For my personal view I'm OK with the current behaviour. It has
> > tradeoffs, and this is one of the negatives, but although I find myself
> > doing this interactively quite often I only very rarely find myself
> > doing it inside an application.
>
> IMO, when a "proprietary" DBA (like me) hears that that statement
> does table scans, s/he will be stunned, and wonder what other
> "gotchas" are lurking out there awaiting someone who wants to
> query enterprise-sized tables.

I was wondering the same thing. I read the html manual, O'Reilly's
Practical PostgreSQL, Sam's PostgreSQL Developer's Handbook and have
browsed http://techdocs.postgresql.org. I also lurk on this list and
ocasionally ask and answer questions. Where in all that information am I
supposed to pick up that 'SELECT max(foo) FROM quux' should be written as
'SELECT foo FROM quux ORDER BY foo LIMIT 1'. That's really unintuitive and
if this info isn't in the docs I've read so far, I'm not sure where it is.
Am I supposed to read the source for comments as well? So mostly I just
want to know where these suggested work arounds are documented. Is there a
particular set of keywords that work for searching the hacker's list? I'm
at a loss as to where to get this (obviously) valuable info.

Pointers would be appreciated,

Joshua b. Jore ; http://www.greentechnologist.org ; 10012 11010 11022
10202 1012 2122 11020 10202 10202 11002 1020 1012 11102 11102 11102 1201
11001 11002 10211 11020 10202 10202 11002 11021 1201 11010 11020 10211

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Joshua b. Jore 2002-05-25 20:36:10 Re: Why sequential scan when there's a supporting index?
Previous Message Ron Johnson 2002-05-25 11:35:30 Re: Why sequential scan when there's a supporting index?