"Josh Berkus" <[EMAIL PROTECTED]> 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
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly