From: | "Charles H(dot) Woloszynski" <chw(at)clearmetrix(dot)com> |
---|---|
To: | Hilmar Lapp <hlapp(at)gmx(dot)net> |
Cc: | Jeff <threshar(at)torgo(dot)978(dot)org>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: [PERFORM] join over 12 tables takes 3 secs to plan |
Date: | 2003-01-03 22:16:32 |
Message-ID: | 3E160BC0.3020900@clearmetrix.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc pgsql-performance |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Hilmar Lapp | 2003-01-03 22:22:49 | Re: join over 12 tables takes 3 secs to plan |
Previous Message | Hilmar Lapp | 2003-01-03 22:09:02 | Re: join over 12 tables takes 3 secs to plan |
From | Date | Subject | |
---|---|---|---|
Next Message | Hilmar Lapp | 2003-01-03 22:22:49 | Re: join over 12 tables takes 3 secs to plan |
Previous Message | Hilmar Lapp | 2003-01-03 22:09:02 | Re: join over 12 tables takes 3 secs to plan |