<<Actually it's quite possible that
that extra overhead in nested loop is largely gettimeofday() calls for the
explain analyze. Does the query take less time run without explain analyze
than it does run with it?
>>
Do you mean that an EXPLAIN ANALYZE that runs longer than the actual query
is a symptom of time being lost to a function call?