Re: Slow query problem

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Slow query problem
Дата
Msg-id 200401090854.46480.dev@archonet.com
обсуждение исходный текст
Ответ на Re: Slow query problem  (Dennis Björklund <db@zigo.dhs.org>)
Ответы Re: Slow query problem
Список pgsql-performance
On Friday 09 January 2004 07:29, Dennis Björklund wrote:
> On Thu, 8 Jan 2004, Bradley Tate wrote:
> >
> > select invheadref, invprodref, sum(units)
> > from invtran
> > group by invheadref, invprodref

> For the above query, shouldn't you have one index for both columns
> (invheadref, invprodref). Then it should not need to sort at all to do the
> grouping and it should all be fast.

Not sure if that would make a difference here, since the whole table is being
read.

--
  Richard Huxton
  Archonet Ltd

В списке pgsql-performance по дате отправления:

Предыдущее
От: Dennis Björklund
Дата:
Сообщение: Re: Slow query problem
Следующее
От: Dennis Björklund
Дата:
Сообщение: Re: Slow query problem