Re: simple join uses indexes, very slow

Dave Dutcher <dave@tridecap.com>

From: "Dave Dutcher" <dave@tridecap.com>
To: "'Steinar H. Gunderson'" <sgunderson@bigfoot.com>, <pgsql-performance@postgresql.org>
Date: 2006-03-29T01:30:23Z
Lists: pgsql-performance
> -----Original Message-----
> From: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-
> owner@postgresql.org] On Behalf Of Steinar H. Gunderson
> A merge join requires sorted inputs.
> 
> > Most of the time was spent sorting the parameters parameters table
by
> > opset_num even though opset_num is indexed. Isn't Postgres able to
walk
> the
> > index instead of sorting?
> 
> The time of an index scan vs. a sequential scan + sort depends on
several
> factors, so it's not just a matter of walking the index whenever there
is
> one.

I was just looking this over again and I realized I misread the query
plan.  The slowest step was the Bitmap Heap Scan not the sort.  (The
sort was relatively fast.)