Re: Lot'sa joins - performance tip-up, please? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Lot'sa joins - performance tip-up, please?
Date
Msg-id 17793.1146679117@sss.pgh.pa.us
Whole thread Raw
In response to Lot'sa joins - performance tip-up, please?  (Mario Splivalo <msplival@jagor.srce.hr>)
Responses Re: Lot'sa joins - performance tip-up, please?  (Mario Splivalo <msplival@jagor.srce.hr>)
List pgsql-performance
Mario Splivalo <msplival@jagor.srce.hr> writes:
> I have a quite large query that takes over a minute to run on my laptop.

The EXPLAIN output you provided doesn't seem to agree with the stated
query.  Where'd the "service_id = 1102" condition come from?

In general, I'd suggest playing around with the join order.  Existing
releases of PG tend to throw up their hands when faced with a mixture of
outer joins and regular joins, and just join the tables in the order
listed.  8.2 will be smarter about this, but for now you have to do it
by hand ...

            regards, tom lane

pgsql-performance by date:

Previous
From: "Ian Burrell"
Date:
Subject: Re: Nested loop join and date range query
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Slow restoration question