pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Crowley <stephen.crowley@gmail.com>
To: pgsql-performance@postgresql.org
Cc: Kris Jurka <books@ejurka.com>
Subject: Re: Large # of rows in query extremely slow, not using index
Date: Thu, 23 Sep 2004 18:36:49 -0500
Message-ID: <3f71fdf104092316367c5f3052@mail.gmail.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0409231816450.18935@leary.csoft.net>
References: <3f71fdf104091317515c756512@mail.gmail.com>
	<28088.1095124267@sss.pgh.pa.us>
	<3f71fdf104091318228099815@mail.gmail.com>
	<28432.1095126554@sss.pgh.pa.us>
	<3f71fdf104091323047de7bb01@mail.gmail.com>
	<Pine.BSO.4.56.0409231816450.18935@leary.csoft.net>

Thanks for the explanation. So what sort of changes need to be made to
the client/server protocol to fix this problem?



On Thu, 23 Sep 2004 18:22:15 -0500 (EST), Kris Jurka <books@ejurka.com> wrote:
> 
> 
> On Tue, 14 Sep 2004, Stephen Crowley wrote:
> 
> > Problem solved.. I set the fetchSize to a reasonable value instead of
> > the default of unlimited  in the PreparedStatement and now the query
> > is . After some searching it seeems this is a common problem, would it
> > make sense to change the default value to something other than 0 in
> > the JDBC driver?
> 
> In the JDBC driver, setting the fetch size to a non-zero value means that
> the query will be run using what the frontend/backend protocol calls a
> named statement.  What this means on the backend is that the planner will
> not be able to use the values from the query parameters to generate the
> optimum query plan and must use generic placeholders and create a generic
> plan.  For this reason we have decided not to default to a non-zero
> fetch size.  This is something whose default value could be set by a URL
> parameter if you think that is something that is really required.
> 
> Kris Jurka
> 
>



view thread (17+ messages)  latest in thread

Message-ID: <3f71fdf104092316367c5f3052@mail.gmail.com>
Permalink:  ../3f71fdf104092316367c5f3052@mail.gmail.com/
Also on:    postgresql.org/message-id/3f71fdf104092316367c5f3052@mail.gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: stephen.crowley@gmail.com, books@ejurka.com
  Subject: Re: Large # of rows in query extremely slow, not using index
  In-Reply-To: <3f71fdf104092316367c5f3052@mail.gmail.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