Skip site navigation (1) Skip section navigation (2)

Re: PREPARE and stuff

From: "Andreas Kostyrka" <andreas(at)kostyrka(dot)org>
To: PFC <lists(at)peufeu(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: PREPARE and stuff
Date: 2007-06-23 21:55:49
Message-ID: ymjDDyWvYfwJ.Yf5DLVl5@heaven.kostyrka.org (view raw or flat)
Thread:
Lists: pgsql-performance
Well, that's not completely trivial => the plan might depend upon the concrete value of $1,$2 and $3.

Andreas

-- Urspr√ľngl. Mitteil. --
Betreff:	[PERFORM] PREPARE and stuff
Von:	PFC <lists(at)peufeu(dot)com>
Datum:		23.06.2007 21:31


	Suppose a web application with persistent database connections.
	I have some queries which take longer to plan than to execute !

	I with there was a way to issue a PREPARE (like "PERSISTENT PREPARE").
	Now all Postgres connections would know that prepared statement foo( $1,  
$2, $3 ) corresponds to some SQL query, but it wouldn't plan it yet. Just  
like a SQL function.
	When invoking EXECUTE foo( 1,2,3 ) on any given connection the statement  
would get prepared and planned. Then on subsequent invocations I'd just  
get the previously prepared plan.

	Is this planned ?

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Responses

pgsql-performance by date

Next:From: Gregory StarkDate: 2007-06-23 22:02:25
Subject: Re: PREPARE and stuff
Previous:From: Heikki LinnakangasDate: 2007-06-23 21:51:00
Subject: Re: PREPARE and stuff

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group