Re: strange problem
| От | Kris Jurka |
|---|---|
| Тема | Re: strange problem |
| Дата | |
| Msg-id | Pine.BSO.4.61.0601251518480.20277@leary.csoft.net обсуждение исходный текст |
| Ответ на | strange problem ("Gilbert, Antoine" <AGilbert@korem.com>) |
| Список | pgsql-jdbc |
On Wed, 25 Jan 2006, Gilbert, Antoine wrote:
> I have a single PostGIS table in PostgreSQL
> This table has 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.
>
By default the JDBC driver will fetch the entire ResultSet before the
executeQuery call returns. If you don't want this behavior set the
fetchsize appropriately. See the following for more information:
http://jdbc.postgresql.org/documentation/81/query.html#query-with-cursor
Kris Jurka
В списке pgsql-jdbc по дате отправления: