Re: [PERFORM] prepared transactions that persist across sessions?

2005-10-23 Thread Bruno Wolff III
On Sun, Oct 23, 2005 at 00:14:23 -0400,
  [EMAIL PROTECTED] wrote:
 Hey all.
 
 Please point me to a place I should be looking if this is a common
 question that has been debated periodically and at great length
 already. :-)

You probably want to read:
http://candle.pha.pa.us/main/writings/pgsql/sgml/runtime-config-query.html

Connection pooling might be another approach, since it should be possible
to reuse prepared statements when reusing a connection.

 I have a complex query. It's a few Kbytes large, and yes, I've already
 worked on reducing it to be efficient in terms of database design, and
 minimizing the expressions used to join the tables. Running some timing
 tests, I've finding that the query itself, when issued in full, takes
 around 60 milliseconds to complete on modest hardware. If prepared, and
 then executed, however, it appears to take around 60 milliseconds to
 prepare, and 20 milliseconds to execute. I'm not surprised. PostgreSQL
 is very likely calculating the costs of many, many query plans.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [PERFORM] prepared transactions that persist across sessions?

2005-10-23 Thread Christopher Kings-Lynne

I am using PHP's PDO PGSQL interface - I haven't read up enough on it
to determine whether a persistent connection can re-use server-side
prepared queries as an option. Anybody know?


It re-uses server-side prepared queries by default, if you are using the 
 PDOPrepare/PDOExecute stuff.


Chris


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