Re: Does SETOF make queries slower?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Does SETOF make queries slower?
Дата
Msg-id 23048.1080887178@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Does SETOF make queries slower?  ("Eduardo Naschenweng" <eduardo.naschenweng@digitro.com.br>)
Список pgsql-admin
"Eduardo Naschenweng" <eduardo.naschenweng@digitro.com.br> 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Andrew Biagioni
Дата:
Сообщение: plpgsql editor(s)?
Следующее
От: Bradley Kieser
Дата:
Сообщение: Re: Do Petabyte storage solutions exist?