Re: Inner join vs where-clause subquery

From: Richard Huxton <dev(at)archonet(dot)com>
To: Jeremy Haile <jhaile(at)fastmail(dot)fm>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Inner join vs where-clause subquery
Date: 2006-12-19 16:31:41
Message-ID: 458813ED.50108@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-12-19 16:59:15 Re: Insertion to temp table deteriorating over time
Previous Message Steven Flatt 2006-12-19 15:43:13 Re: Insertion to temp table deteriorating over time