pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joe Conway <mail@joeconway.com>
Cc: josh@agliodbs.com, Richard Huxton <dev@archonet.com>
Cc: Michael Pohl <pgsql@newtopia.com>
Cc: pgsql-sql@postgresql.org, "George A.J" <jinujosein@yahoo.com>
Subject: Re: Which is faster SQL or PL/PGSQL
Date: Mon, 20 Oct 2003 15:50:00 -0400
Message-ID: <13678.1066679400@sss.pgh.pa.us> (raw)
In-Reply-To: <3F942F72.6050709@joeconway.com>
References: <Pine.LNX.4.44.0310201119240.10378-100000@server1.techplant.com>
	<200310201849.19668.dev@archonet.com>
	<3F942558.2000804@joeconway.com>
	<200310201124.02090.josh@agliodbs.com>
	<3F942F72.6050709@joeconway.com>

Joe Conway <mail@joeconway.com> writes:
> Josh Berkus wrote:
>> While we're on the topic, anyone know any good ways to speed up EXECUTE 
>> statements in PL/pgSQL functions?

> Never tried it, but is it possible to use a prepared statement inside a 
> PL/pgSQL function?

You could probably EXECUTE prepare and execute statements, but I don't
see the point --- this would just be an extremely tedious way of
duplicating plpgsql's normal query-plan-caching behavior.

AFAICS, the whole point of EXECUTE in plpgsql is that it doesn't take
any shortcuts, and so the answer to Josh's question can only be "don't
use EXECUTE"...

			regards, tom lane



view thread (13+ messages)  latest in thread

Message-ID: <13678.1066679400@sss.pgh.pa.us>
Permalink:  ../13678.1066679400@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13678.1066679400@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, mail@joeconway.com, dev@archonet.com, pgsql@newtopia.com, jinujosein@yahoo.com
  Subject: Re: Which is faster SQL or PL/PGSQL
  In-Reply-To: <13678.1066679400@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