| From: | "Jim C(dot) Nasby" <decibel(at)decibel(dot)org> |
|---|---|
| To: | PFC <lists(at)boutiquenumerique(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: self-join on subselect |
| Date: | 2005-01-27 01:24:36 |
| Message-ID: | 20050127012436.GL67721@decibel.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
It's not at all clear what you're asking. Do you have a real example,
preferably with EXPLAIN output?
On Wed, Jan 26, 2005 at 11:12:25PM +0100, PFC wrote:
>
> How do you do a self-join on a subselect ?
>
> like
> SELECT a.x+b.x FROM (subselect) a, (subselect) b WHERE a.id = b.id+10
>
> but without performing the subselect twice
> ..................................?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2005-01-27 01:29:29 | Re: difficult JOIN |
| Previous Message | phil campaigne | 2005-01-27 01:06:12 | Numeric type |