On second thought another way to optimize a query like that would be to remove the * and only put in the columns that are actually being used, as opposed to taking the * literally. Such that if the fields in the select list use 2 columns and the join uses 1 column, only those 3 columns should be expanded by the optimizer. This would probably make the query more efficient as well, being that it selects fewer fields.
Thank You Sim Zacks IT Manager CompuLab 04-829-0145 - Office 04-832-5251 - Fax ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html