Re: Puzzling planner choice (non-urgent) - Mailing list pgsql-general

From Richard Huxton
Subject Re: Puzzling planner choice (non-urgent)
Date
Msg-id 200208051720.31517.dev@archonet.com
Whole thread Raw
In response to Re: Puzzling planner choice (non-urgent)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Monday 05 Aug 2002 3:28 pm, Tom Lane wrote:
> Richard Huxton <dev@archonet.com> writes:
> > What I don't understand is the seq-scan on companies.co_id since it has a
> > unique index on it and *can't* match more than once for a given row while
> > looping through orders.
>
> Since the table is evidently only 2 pages long, the planner figures it's
> cheaper to read it all than to touch both the index and the table.

Ah - seems like a good guess Tom. I've upped companies to 1000 entries and the
planner switches to an index-scan.

- Richard Huxton

pgsql-general by date:

Previous
From: "Henrik Steffen"
Date:
Subject: psql client
Next
From: Bruce Momjian
Date:
Subject: Re: O'Reilly Open Source Convention Report