pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mario Splivalo <msplival@jagor.srce.hr>
Cc: pgsql-performance@postgresql.org
Subject: Re: Lot'sa joins - performance tip-up, please?
Date: Wed, 03 May 2006 13:58:37 -0400
Message-ID: <17793.1146679117@sss.pgh.pa.us> (raw)
In-Reply-To: <1146533274.14006.11.camel@localhost.localdomain>
References: <1146533274.14006.11.camel@localhost.localdomain>

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



view thread (8+ messages)  latest in thread

Message-ID: <17793.1146679117@sss.pgh.pa.us>
Permalink:  ../17793.1146679117@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17793.1146679117@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, msplival@jagor.srce.hr
  Subject: Re: Lot'sa joins - performance tip-up, please?
  In-Reply-To: <17793.1146679117@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox