pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Jeremy Haile <jhaile@fastmail.fm>
Cc: pgsql-performance@postgresql.org
Subject: Re: Inner join vs where-clause subquery
Date: Tue, 19 Dec 2006 16:31:41 +0000
Message-ID: <458813ED.50108@archonet.com> (raw)
In-Reply-To: <1166538737.31684.281175363@webmail.messagingengine.com>
References: <1166538737.31684.281175363@webmail.messagingengine.com>

Jeremy Haile wrote:
> I have the following query which performs extremely slow:
> select min(nlogid) as start_nlogid,
>        max(nlogid) as end_nlogid,
>        min(dtCreateDate) as start_transaction_timestamp,
>        max(dtCreateDate) as end_transaction_timestamp
> from activity_log_facts 
> where nlogid > ( select max(a.end_nlogid) from
> activity_log_import_history a)
> and dtCreateDate < '2006-12-18 9:10'

Can you post the EXPLAIN ANALYSE for this one please? That'll show us 
exactly what it's doing.

-- 
   Richard Huxton
   Archonet Ltd



view thread (8+ messages)  latest in thread

Message-ID: <458813ED.50108@archonet.com>
Permalink:  ../458813ED.50108@archonet.com/
Also on:    postgresql.org/message-id/458813ED.50108@archonet.com

 · 

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: dev@archonet.com, jhaile@fastmail.fm
  Subject: Re: Inner join vs where-clause subquery
  In-Reply-To: <458813ED.50108@archonet.com>

* 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