pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: mark@mark.mielke.cc
Cc: pgsql-performance@postgresql.org
Subject: Re: prepared transactions that persist across sessions?
Date: Sun, 23 Oct 2005 01:51:36 -0500
Message-ID: <20051023065136.GA12238@wolff.to> (raw)
In-Reply-To: <20051023041423.GA11639@mark.mielke.cc>
References: <20051023041423.GA11639@mark.mielke.cc>

On Sun, Oct 23, 2005 at 00:14:23 -0400,
  mark@mark.mielke.cc 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.



view thread (3+ messages)  latest in thread

Message-ID: <20051023065136.GA12238@wolff.to>
Permalink:  ../20051023065136.GA12238@wolff.to/
Also on:    postgresql.org/message-id/20051023065136.GA12238@wolff.to

 · 

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-performance@postgresql.org
  Cc: bruno@wolff.to, mark@mark.mielke.cc
  Subject: Re: prepared transactions that persist across sessions?
  In-Reply-To: <20051023065136.GA12238@wolff.to>

* 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