Re: patch: fix performance problems with repated decomprimation of varlena values in plpgsql

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: patch: fix performance problems with repated decomprimation of varlena values in plpgsql
Date: 2011-03-10 23:19:47
Message-ID: 201103102319.p2ANJlk21274@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


What happened with this patch? Alvaro saw a 25x speedup.

---------------------------------------------------------------------------

Pavel Stehule wrote:
> Hello
>
> this patch remove a multiple detoasting of varlena values in plpgsql.
>
> It is usable mainly for iteration over longer array directly loaded
> from relation.
>
> It's doesn't have a impact on semantic or behave - it's just eliminate
> some performance trap.
>
> sample: table 10000 rows one column with array with 1000 string fields:
>
> patched pl time: 6 sec
> unpatched pl time: 170 sec
>
> This doesn't change my opinion on FOR-IN-ARRAY cycle (is still
> important for readability) - just remove one critical performance
> issue
>
> Regards
>
> Pavel Stehule

[ Attachment, skipping... ]

>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-03-10 23:25:34 Re: Indent authentication overloading
Previous Message Bruce Momjian 2011-03-10 23:15:01 Re: Indent authentication overloading