Re: Which is faster SQL or PL/PGSQL - Mailing list pgsql-sql

From Tom Lane
Subject Re: Which is faster SQL or PL/PGSQL
Date
Msg-id 13678.1066679400@sss.pgh.pa.us
Whole thread Raw
In response to Re: Which is faster SQL or PL/PGSQL  (Joe Conway <mail@joeconway.com>)
Responses Re: Which is faster SQL or PL/PGSQL  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: weigelt@metux.de
Date:
Subject: Re: [postgres] Deutsche PostgreSQL-Mailingliste unter postgresql.org
Next
From: Ewald Geschwinde
Date:
Subject: Re: [postgres] Deutsche PostgreSQL-Mailingliste unter postgresql.org