"Eduardo Naschenweng" <[EMAIL PROTECTED]> writes: > bxs=3D# EXPLAIN ANALYZE SELECT dt_inicial, identidadea FROM cham_chamada cc= > ;=0D > [ is faster than ] > bxs=3D# EXPLAIN ANALYZE SELECT * FROM teste();=0D
nodeFunctionscan.c insists on cramming the results of the function into a tuplestore and then reading them back. This is fairly expensive for a large result set. I complained about this back when the implementation was first proposed, but we set the problem aside for the time being, and it hasn't been revisited. One reason for it is that a function is by nature not very transparent, so it's hard to tell whether the storage overhead is necessary or not. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster