> In contrast, if I issue the query on the DB server in the psql console, it
> returns records almost immediately. Finally I found that it is because the
> postgreSQL JDBC driver is pre-fetching a lot (all?) of the records. To fix
> the problem, one can call setFetchSize(50) on the statement.
>
> psql doesnt do anything any differently. It just doesn't have to create
objects, and you are likely local to the network.
And yes, setFetchSize is the correct way to handle this.
Dave