Just a general note re the subject, I've also had troubles withpostgres being unable to optimize a query with OR. The work-around,although a bit messy, was to use a UNION-query instead.