[postgis-users] strange jdbc problem

Paul Ramsey pramsey at refractions.net
Wed Jan 25 13:21:35 PST 2006


Antoine,

You need to use a forwardonly cursor if you want a fast return.   
Otherwise the JDBC system is pulling the whole resultset into the  
client side, for your use.  This is a general postgresql jdbc issue,  
not a postgis issue, check the jdbc documentation on the postgresql  
site.

P.

On Jan 25, 2006, at 11:50 AM, Gilbert, Antoine wrote:

> Hi
>
>
> I have a single PostGIS table in PostgreSQL
>
>
> This table have like 500000 records
>
>
> I use the JDBC driver to only send a quick query without browsing  
> resultset and it take forever. For example:
>
>
> Statement stmt = connection.createStatement();
>
> ResultSet rs =stmt.executeQuery("select street from \"QCs_polyline 
> \"");
>
> stmt.close();
>
>
> This takes 19 sec. Does I am missing something like a configuration  
> on the driver? So far I was just testing PostGIS/PostgreSQL with  
> tiny tables.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list