From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hugo Mercier <hugo(dot)mercier(at)oslandia(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Detection of nested function calls |
Date: | 2013-10-25 17:41:47 |
Message-ID: | CA+Tgmob5SkFDj_HL76fPUVwVu_hZz4i5v2eP=4j4QzJsdu=n1A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 25, 2013 at 10:18 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Hugo Mercier <hugo(dot)mercier(at)oslandia(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Emanuel Calvo | 2013-10-25 17:50:45 | Additional information on log_line_prefix |
Previous Message | fabriziomello | 2013-10-25 17:37:24 | Re: psql should show disabled internal triggers |