ResultSet memory usage

Поиск
Список
Период
Сортировка
От Timo Savola
Тема ResultSet memory usage
Дата
Msg-id 1010749298.10336.3.camel@vorlon
обсуждение исходный текст
Ответы Re: ResultSet memory usage  ("Dave Cramer" <Dave@micro-automation.net>)
Re: ResultSet memory usage  ("Nick Fankhauser" <nickf@ontko.com>)
Список pgsql-jdbc
Hi. I'm new to this list, so please be gentle.

I've been using PostgreSQL with a Java application that needs to SELECT
(without LIMIT) from a table with a lot or rows. I tested the
application when the table in question had over 2 million rows, and the
JVM kept running out of memory (of course I could tune the heap size
settings). I don't actually need all the 2 million rows; the application
logic selects some of the first rows (in a manner that I couldn't
implement in the SQL query) and then stops reading the ResultSet.

I checked the code of the JDBC driver. As far as I can understand
org/postgresql/jdbc2/ResultSet.java, the whole result set is read into
memory at once. Is there any practical way to tune the driver to read
the rows a little at a time? Any plans to enhance the driver to do that?
Would it be a big job to write such a patch without prior knowledge of
the internals of PostgreSQL?

Timo



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Ed Yu"
Дата:
Сообщение: Re: Statement.java patch (Postgresql 7.1.3)
Следующее
От: "Dave Cramer"
Дата:
Сообщение: Re: ResultSet memory usage