pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Dutcher <dave@tridecap.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Left Join Performance vs Inner Join Performance
Date: Tue, 10 Jan 2006 23:38:20 -0500
Message-ID: <8321.1136954300@sss.pgh.pa.us> (raw)
In-Reply-To: <011f01c61653$96c509f0$8300a8c0@tridecap.com>
References: <011f01c61653$96c509f0$8300a8c0@tridecap.com>

"Dave Dutcher" <dave@tridecap.com> writes:
> I have an inner join query that runs fast, but I when I change to a left
> join the query runs 96 times slower.

This looks like an issue that is fixed in the latest set of releases,
namely that OUTER JOIN ON conditions that reference only the inner
side of the join weren't getting pushed down into indexquals.  See
thread here:
http://archives.postgresql.org/pgsql-performance/2005-12/msg00134.php
and patches in this and the following messages:
http://archives.postgresql.org/pgsql-committers/2005-12/msg00105.php

			regards, tom lane



view thread (2+ messages)

Message-ID: <8321.1136954300@sss.pgh.pa.us>
Permalink:  ../8321.1136954300@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8321.1136954300@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, dave@tridecap.com
  Subject: Re: Left Join Performance vs Inner Join Performance
  In-Reply-To: <8321.1136954300@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