Re: vacuum locking - Mailing list pgsql-performance

From scott.marlowe
Subject Re: vacuum locking
Date
Msg-id Pine.LNX.4.33.0310300728240.23153-100000@css120.ihs.com
Whole thread Raw
In response to Re: vacuum locking  (Rob Nagler <nagler@bivio.biz>)
Responses Re: vacuum locking
List pgsql-performance
On Wed, 29 Oct 2003, Rob Nagler wrote:

> Greg Stark writes:
> > > > SELECT a, (SELECT name FROM t2 WHERE t2.f2 = t1.f2)
> > > >   FROM t1
> > > >  GROUP BY f2
> > >
> > > This doesn't solve the problem.  It's the GROUP BY that is doing the
> > > wrong thing.  It's grouping, then aggregating.
> >
> > But at least in the form above it will consider using an index on f2, and it
> > will consider using indexes on t1 and t2 to do the join.
>
> There are 20 rows in t2, so an index actually slows down the join.
> I had to drop the index on t1.f2, because it was trying to use it
> instead of simply sorting 20 rows.

t2 was 'vacuum full'ed and analyzed, right?  Just guessing.


pgsql-performance by date:

Previous
From:
Date:
Subject: Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ]
Next
From: Christopher Browne
Date:
Subject: Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ]