Re: vacuum locking

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: vacuum locking
Дата
Msg-id Pine.LNX.4.33.0310300728240.23153-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: vacuum locking  (Rob Nagler <nagler@bivio.biz>)
Ответы Re: vacuum locking  (Rob Nagler <nagler@bivio.biz>)
Список 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 по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ]
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ]