pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marc Herbert <Marc.Herbert@continuent.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Limit vs setMaxRows issue
Date: Mon, 10 Jul 2006 10:51:21 +0200
Message-ID: <khjd5cd4zcm.fsf@meije.emic.fr> (raw)
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>

Tom Lane <tgl@sss.pgh.pa.us> writes:

> No, it would take a protocol change to add such a thing out-of-line
> (that is, not as a LIMIT clause in the query text).  The reason is that
> the planning is done at PARSE time, or at the latest BIND time.  The
> row limit field in the EXECUTE message comes far too late to affect the
> query plan. 


If planning is done at time of creation of the PreparedStatement
object (reminder: the example given above has no parameters), then the
setMaxRows() call will come too late whatever is the protocol change.
I mean: no protocol change can go back in time and "optimize" by not
doing useless work already done.

Thanks in advance for pointing out my mistake(s) here.




view thread (23+ messages)  latest in thread

Message-ID: <khjd5cd4zcm.fsf@meije.emic.fr>
Permalink:  ../khjd5cd4zcm.fsf@meije.emic.fr/
Also on:    postgresql.org/message-id/khjd5cd4zcm.fsf@meije.emic.fr

 · 

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-jdbc@postgresql.org
  Cc: Marc.Herbert@continuent.com
  Subject: Re: Limit vs setMaxRows issue
  In-Reply-To: <khjd5cd4zcm.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>

* 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