Greg Stark <[EMAIL PROTECTED]> writes: > What's really strange is that some other > queries perform fine but this one and a few others reliably takes this long > and behaves this way under explain analyze. It's as if there's something > specific about this query that triggers the delay.
You haven't shown us the query (naughty naughty) but I'm wondering about extremely-expensive-to-evaluate immutable functions. An immutable function applied to constant arguments will be evaluated in the planner. The difference between total time and run time has to be essentially all parse/rewrite/plan time, and the query doesn't look complex enough to be needing a full second to plan without some, um, outside help. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match