pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Charles H. Woloszynski <chw@clearmetrix.com>
To: Hilmar Lapp <hlapp@gmx.net>
Cc: Jeff <threshar@torgo.978.org>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: [PERFORM] join over 12 tables takes 3 secs to plan
Date: Fri, 03 Jan 2003 17:16:32 -0500
Message-ID: <3E160BC0.3020900@clearmetrix.com> (raw)
In-Reply-To: <FC24BF36-1F52-11D7-9CCF-000393B4BFF6@gmx.net>
References: <FC24BF36-1F52-11D7-9CCF-000393B4BFF6@gmx.net>

I have been asking (and learning) about this same thing on the 
PGSQL-JDBC mailing list.  Apparently, there is a new driver for 7.3 that 
can store the plan on the server (aka, preparing it on the server) and 
re-use it.  However, you need to set the PreparedStatement to do this 
for each statement.  So, yes, you can retain the plan but it looks like 
you need to do some work to make it stick.  [Also, you need to retain 
the PreparedStatement, it is not cached based based on the text of the
statement, but associated with the PreparedStatement itself].

I think the functionality is starting to become real, but it looks like 
it is starting with some limitations that might restricts its use from 
be maximally realized until 7.4 (or beyond).

Charlie




Hilmar Lapp wrote:

>
> On Friday, January 3, 2003, at 09:12  AM, Jeff wrote:
>
>> Hmm.. This won't fix the fact the planner takes three seconds, but since
>> it is a web application have you tried using PREPARE/EXECUTE so it only
>> needs to be planned once?
>
>
> Interesting point. I'd have to look into the source code whether the 
> guy who wrote it actually uses JDBC PreparedStatements. I understand 
> that PostgreSQL from 7.3 onwards supports prepared statements (cool!). 
> Would the JDBC driver accompanying the dist. exploit that feature for 
> its PreparedStatement implementation?
>
>     -hilmar


-- 


Charles H. Woloszynski

ClearMetrix, Inc.
115 Research Drive
Bethlehem, PA 18015

tel: 610-419-2210 x400
fax: 240-371-3256
web: www.clearmetrix.com








view thread (22+ messages)  latest in thread

Message-ID: <3E160BC0.3020900@clearmetrix.com>
Permalink:  ../3E160BC0.3020900@clearmetrix.com/
Also on:    postgresql.org/message-id/3E160BC0.3020900@clearmetrix.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: chw@clearmetrix.com, hlapp@gmx.net, threshar@torgo.978.org
  Subject: Re: [PERFORM] join over 12 tables takes 3 secs to plan
  In-Reply-To: <3E160BC0.3020900@clearmetrix.com>
  References: <FC24BF36-1F52-11D7-9CCF-000393B4BFF6@gmx.net> <3E160BC0.3020900@clearmetrix.com>

* 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