Re: Streaming ResultSet
От | Oliver Jowett |
---|---|
Тема | Re: Streaming ResultSet |
Дата | |
Msg-id | 42DD87EE.8090703@opencloud.com обсуждение исходный текст |
Ответ на | Streaming ResultSet ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>) |
Список | pgsql-jdbc |
Kevin Grittner wrote: > I'm curious about the reasons that this appoach was taken -- why not > return the rows as they are retrieved from the server? The short answer is because to stream on the fly is a much more complex approach and no-one has stepped forward to implement it. > (1) It might not be easy to create all of the right conditions for the > cursored approach to work. Another solution here is to work on making the cursor support code more flexible. Again the main reason that this is not done is that no-one has come up with a robust implementation yet. > (2) You might think you've met all the conditions for the cursored > approach and be wrong. The default behavior might kick in and cause an > OutOfMemoryError. The same is true with a streaming approach. The driver likes to issue its own queries internally in many places; if you happen to trip up on one of those while processing your resultset, boom! Your best bet to see this implemented is to implement it yourself and send us a patch. It's a fairly large chunk of work with debatable benefit, and personally I'd rather spend the time on better cursor support. (if I *had* time!) -O
В списке pgsql-jdbc по дате отправления: