Re: Puzzling planner choice (non-urgent)

From: Richard Huxton <dev(at)archonet(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Puzzling planner choice (non-urgent)
Date: 2002-08-05 16:20:31
Message-ID: 200208051720.31517.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 05 Aug 2002 3:28 pm, Tom Lane wrote:
> Richard Huxton <dev(at)archonet(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-08-05 16:33:59 Re: O'Reilly Open Source Convention Report
Previous Message Henrik Steffen 2002-08-05 16:03:04 psql client