Re: Postgres 8.2 and setFetchSize - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Postgres 8.2 and setFetchSize
Date
Msg-id 46F12313.3030401@opencloud.com
Whole thread Raw
In response to Postgres 8.2 and setFetchSize  (Frédéric Houbie <fh@ionicsoft.com>)
List pgsql-jdbc
Frédéric Houbie wrote:

>         st.setFetchSize(Integer.parseInt(args[0]));
>         System.out.println("FetchSize : " + st.getFetchSize());
>       String q="SELECT a FROM SValues WHERE  Name = 'title'";

> It always take the same time (long time) whatever value I pass to this code for the FetchSize.

Fetch size does not directly affect query speed, it affects the number
of results the driver retrieves at once. If you've got a query that is
slow and takes a long time to return any results at all, changing the
fetchsize isn't going to help.

Since it sounds like you are getting quite different results on two
different server installations I would guess that the two databases are
not actually identical. Perhaps one is using an index but the other
isn't? Try the queries via psql, use EXPLAIN, etc.

-O

pgsql-jdbc by date:

Previous
From: Frédéric Houbie
Date:
Subject: Re: Postgres 8.2 and setFetchSize
Next
From: Oliver Jowett
Date:
Subject: Re: Postgres 8.2 and setFetchSize