pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Richard Sydney-Smith <richard@ibisaustralia.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Mystery function error
Date: Sun, 28 Sep 2003 15:04:13 -0400
Message-ID: <10445.1064775853@sss.pgh.pa.us> (raw)
In-Reply-To: <200309281147.41146.josh@agliodbs.com>
References: <000c01c38572$73c03c50$251a32d2@athlon2000>
	<9634.1064767690@sss.pgh.pa.us>
	<10187.1064773754@sss.pgh.pa.us>
	<200309281147.41146.josh@agliodbs.com>

Josh Berkus <josh@agliodbs.com> writes:
> Hmmm ... this does still seem to show that plpgsql is 10% slower in
> 7.4.

Yeah, I just did some profiling to check on that, and it seems there is
extra overhead in plpgsql's exec_eval_simple_expr(), to the tune of
another palloc or two down inside CreateExprContext().  This probably
would not show up so heavily in a more complex plpgsql function, but
it's a noticeable percentage in this trivial example.

I had noticed this before but I'm not sure there's any easy solution.
Awhile back I looked at saving the exprcontext across calls instead of
creating and deleting it on each call to exec_eval_simple_expr, but the
idea broke down in situations involving recursive plpgsql functions.
I'll take another look though.

			regards, tom lane



view thread (10+ messages)

Message-ID: <10445.1064775853@sss.pgh.pa.us>
Permalink:  ../10445.1064775853@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10445.1064775853@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com, mail@joeconway.com, richard@ibisaustralia.com
  Subject: Re: Mystery function error
  In-Reply-To: <10445.1064775853@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox