Re: Detection of nested function calls

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Detection of nested function calls
Дата
Msg-id CA+Tgmob5SkFDj_HL76fPUVwVu_hZz4i5v2eP=4j4QzJsdu=n1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Detection of nested function calls  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Oct 25, 2013 at 10:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Hugo Mercier <hugo.mercier@oslandia.com> writes:
>> PostGIS functions that manipulate geometries have to unserialize their
>> input geometries from the 'flat' varlena representation to their own,
>> and serialize the processed geometries back when returning.
>> But in such nested call queries, this serialization-unserialization
>> process is just an overhead.
>
> This is a reasonable thing to worry about, not just for PostGIS types but
> for many container types such as arrays --- it'd be nice to be able to
> work with an in-memory representation that wasn't just a contiguous blob
> of data.  For instance, assignment to an array element might become a
> constant-time operation even when working with variable-length datatypes.

I bet numeric could benefit as well.  Essentially all of the
operations on numeric start by transforming the on-disk representation
into an internal form used only for the duration of a single call, and
end by transforming the internal form of the result back to the
on-disk representation.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: fabriziomello
Дата:
Сообщение: Re: psql should show disabled internal triggers
Следующее
От: Emanuel Calvo
Дата:
Сообщение: Additional information on log_line_prefix