Re: View performance question - Mailing list pgsql-sql

From Tom Lane
Subject Re: View performance question
Date
Msg-id 5809.993244291@sss.pgh.pa.us
Whole thread Raw
In response to Re: View performance question  ("Josh Berkus" <josh@agliodbs.com>)
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: timestamp conversion to unisgned long?
Next
From: "Magnus Hagander"
Date:
Subject: RE: firehouse