| From: | Oliver Jowett <oliver(at)opencloud(dot)com> | 
|---|---|
| To: | Bill Schneider <bschneider(at)vecna(dot)com> | 
| Cc: | pgsql-jdbc(at)postgresql(dot)org | 
| Subject: | Re: optimization for repeated values within JOINs | 
| Date: | 2005-02-03 20:52:10 | 
| Message-ID: | 42028EFA.2090407@opencloud.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-jdbc | 
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nahum Castro | 2005-02-03 22:51:14 | next() error | 
| Previous Message | Bill Schneider | 2005-02-03 16:08:05 | optimization for repeated values within JOINs |