Re: View performance question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: View performance question
Дата
Msg-id 5809.993244291@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: View performance question  ("Josh Berkus" <josh@agliodbs.com>)
Список pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
> I tried re-arranging the JOINS as you suggested.  There was no impact on
> gross performance (still 42 seconds to return the first row).  And yes,
> it is the classic "star" database.

> What follows is the query plan.

Hm.  The query plan looks very reasonable: hashing the smaller tables is
exactly what I'd think it should do.  If the rows estimates shown in the
plan are accurate, it's hard to see how it's spending 42 seconds on
this.

The primary tables seem to be big enough that they are probably being
divided into hash batches, if you use the default sort_mem setting of
512K.  Try increasing sort_mem (SET SORT_MEM TO 5000 or so) and see if
that makes a difference.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: timestamp conversion to unisgned long?
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: RE: firehouse