Example 31-2. Setting fetch size to turn cursors on and off.
PostgreSql, JDBC and large result sets
Large ResultSet on postgresql query
Is JDBC a big memory hog?

Setting some reasonable fetch size might be meaningfull when working with results sets consisting from thousands of elements. Appearent difference is that with default fetch size, all data from DB are transferred (and stored until ResultSet is disposed) in JVM memory, but with fetch size only sub-set is needed to kept in memory at once.

Update: 18.1.1020
Chapter: 16.2 Tuning JDBC

Update: 19.1.2010
Batch update sounds interesting performance optimization possibility.
Using Postgresql JDBC for bulk updates – batch size vs performance
Best practices to improve performance in JDBC
Server Prepared Statements (Some discussion of caveat emptors and Prepared statements gotcha and 45.2.3. Extended Query – BIND)

/ java

Vastaa

Sähköpostiosoitettasi ei julkaista. Pakolliset kentät on merkitty *

This site uses Akismet to reduce spam. Learn how your comment data is processed.