From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Rob Nagler <nagler(at)bivio(dot)biz> |
Cc: | <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: vacuum locking |
Date: | 2003-10-30 14:29:32 |
Message-ID: | Pine.LNX.4.33.0310300728240.23153-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2003-10-30 15:10:47 | Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ] |
Previous Message | mallah | 2003-10-30 14:12:00 | Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ] |