pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Bill Schneider <bschneider@vecna.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: optimization for repeated values within JOINs
Date: Fri, 04 Feb 2005 09:52:10 +1300
Message-ID: <42028EFA.2090407@opencloud.com> (raw)
In-Reply-To: <42024C65.50403@vecna.com>
References: <42024C65.50403@vecna.com>

Bill Schneider wrote:

> Does the PostgreSQL JDBC driver/protocol perform any optimization for 
> repeated values created by joins?

No. The existing protocol is documented at 
http://www.postgresql.org/docs/8.0/static/protocol.html

> Has anyone else thought about this, or does it just not affect 
> performance enough to matter?

pgsql-hackers is probably the place to discuss it.

> select a.id, a.longText, b.id
>   from a join b on b.a_id = a.id
>   order by a.id; 

In this case, you could of course turn it into two separate queries when 
you know the characteristics of the query make that a win. It seems like 
a lot of work for marginal benefit to try to do some sort of 
duplicate-elimination automatically in the protocol.

-O



view thread (2+ messages)

Message-ID: <42028EFA.2090407@opencloud.com>
Permalink:  ../42028EFA.2090407@opencloud.com/
Also on:    postgresql.org/message-id/42028EFA.2090407@opencloud.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, bschneider@vecna.com
  Subject: Re: optimization for repeated values within JOINs
  In-Reply-To: <42028EFA.2090407@opencloud.com>
  References: <42024C65.50403@vecna.com> <42028EFA.2090407@opencloud.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