Richard Huxton <dev@xxxxxxxxxxxx> writes: > Ketema wrote: >> 5)Upgrade version of pg..currently is running 8.1.4 > Well every version gets better at planning, so it can't hurt. +1 ... there are at least two things about this query that 8.2 could be expected to be a great deal smarter about: * mixed outer and inner joins * something = ANY(array) regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend