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