From: Oliver Jowett <oliver@opencloud.com>
To: Marc Herbert <Marc.Herbert@continuent.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Limit vs setMaxRows issue
Date: Tue, 11 Jul 2006 22:45:56 +1200
Message-ID: <44B38164.1040606@opencloud.com> (raw)
In-Reply-To: <khjr70szd30.fsf@meije.emic.fr>
References: <44990D57.9070506@sebster.com>
<Pine.BSO.4.63.0606211055020.7242@leary2.csoft.net>
<34158.216.41.12.254.1150906222.squirrel@webmail.webopticon.org>
<11362.1150908394@sss.pgh.pa.us>
<khjd5cd4zcm.fsf@meije.emic.fr>
<44B34751.7010704@opencloud.com>
<khjr70szd30.fsf@meije.emic.fr>
Marc Herbert wrote:
> Oliver Jowett <oliver@opencloud.com> writes:
>> the query is parsed and planned immediately before execution.
>
> Hum, interesting. Looks like "lazy prepared" statement, no
> pre-compilation? If you delay parsing & planning then of course you
> would not need to go back in time to add late
> optimizations...
I don't know what you mean by "lazy prepared" statements. We give the
statement to the server for parsing and planning at the point when we
know both the query and the parameter types -- which, because of the
JDBC API design, means just before execution. We retain the parse/plan
results on the server side when it looks like the statement will be
reused (using a simple "how many times has this statement already been
reused?" metric), otherwise we reparse/replan on each execution.
> However, what about the following executions of the same and now
> already prepared and planned statement? Now you would have to go back
> in time to perform any .setMaxRows() optimization, right?
It's no different to the case where you change the parameter types really.
-O
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-jdbc@postgresql.org
Cc: oliver@opencloud.com, Marc.Herbert@continuent.com
Subject: Re: Limit vs setMaxRows issue
In-Reply-To: <44B38164.1040606@opencloud.com>
References: <44990D57.9070506@sebster.com> <Pine.BSO.4.63.0606211055020.7242@leary2.csoft.net> <34158.216.41.12.254.1150906222.squirrel@webmail.webopticon.org> <11362.1150908394@sss.pgh.pa.us> <khjd5cd4zcm.fsf@meije.emic.fr> <44B34751.7010704@opencloud.com> <khjr70szd30.fsf@meije.emic.fr> <44B38164.1040606@opencloud.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