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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mario Splivalo <msplival(at)jagor(dot)srce(dot)hr>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Lot'sa joins - performance tip-up, please?
Date: 2006-05-03 17:58:37
Message-ID: 17793.1146679117@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mario Splivalo <msplival(at)jagor(dot)srce(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-03 18:08:21 Re: Slow restoration question
Previous Message Ian Burrell 2006-05-03 17:54:04 Re: Nested loop join and date range query