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@xxxxxxxxxxx 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?" ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)