"Baudracco Pierre" <[EMAIL PROTECTED]> writes: > on a simple data model (a contact, linked to a company and categories > categorizing a contact) this query takes more than 30 seconds ! > ... > If I invert (only change) the LEFT JOIN clause the queries returns > immediately
Existing Postgres releases do not consider rearranging the order of outer joins, because they don't have the logic needed to determine whether it's safe (will give the same answer) or not to change the join order. 8.2 will be smarter. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly