Skip site navigation (1) Skip section navigation (2)

Re: Does SETOF make queries slower?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Eduardo Naschenweng" <eduardo(dot)naschenweng(at)digitro(dot)com(dot)br>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Does SETOF make queries slower?
Date: 2004-04-02 06:26:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
"Eduardo Naschenweng" <eduardo(dot)naschenweng(at)digitro(dot)com(dot)br> writes:
> bxs=3D# EXPLAIN ANALYZE SELECT dt_inicial, identidadea FROM cham_chamada cc=
> ;=0D
> [ is faster than ]

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

In response to

pgsql-admin by date

Next:From: Bradley KieserDate: 2004-04-02 10:36:12
Subject: Re: Do Petabyte storage solutions exist?
Previous:From: Christopher BrowneDate: 2004-04-02 02:01:24
Subject: Re: plpgsql editor(s)?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group