[EMAIL PROTECTED] writes: > I have a query that is extraordinarily slow but I don't know why.
It looks like spview is a view with an embedded ORDER BY? IIRC that prevents any meaningful optimization of joins to it --- and WHERE-IN-sub-SELECT is a kind of join. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq