Re: plpgsql: penalty due to double evaluation of parameters

From: Nikhils <nikkhils(at)gmail(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, rushabh(dot)lathia(at)gmail(dot)com
Subject: Re: plpgsql: penalty due to double evaluation of parameters
Date: 2008-05-21 13:20:02
Message-ID: d3c4af540805210620m499a5d49paf90294cdb97e805@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I don't buy the performance argument unless I see some test results
> demonstrating it; exec_prepare_plan is only called on the first invocation
> of a statement. What kind of side-effects could exec_eval_datum call have?
>

Note that I have avoided using the "performance" word for this very reason.
But consider for example when the datum type is PLPGSQL_DTYPE_REC. I dont
think its justified to have the overhead of heap_copytuple_with_tuple, when
all we need is just the typeid! Similar arguments apply for other datums
like PLPGSQL_DTYPE_ROW, PLPGSQL_DTYPE_TRIGARG e.g.

Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2008-05-21 13:37:37 Re: idea: storing view source in system catalogs
Previous Message Richard Huxton 2008-05-21 13:09:49 Re: Posible planner improvement?