Re: [PERFORM] join over 12 tables takes 3 secs to plan - Mailing list pgsql-jdbc

From Charles H. Woloszynski
Subject Re: [PERFORM] join over 12 tables takes 3 secs to plan
Date
Msg-id 3E160BC0.3020900@clearmetrix.com
Whole thread Raw
List pgsql-jdbc
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






pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: [GENERAL] 7.3 Prepared statements
Next
From: Daniel Bruce Lynes
Date:
Subject: Re: Unable to download/compile postgresql.jar for PG 7.3 with JDK 1.4.1