Raising the fetchsize, good or bad? Exploring memory management in Oracle JDBC 12c
By default, on each roundtrip to the database, Oracle's JDBC Thin Driver retrieves 10 rows of a given result set. This is known as fetch size, and it is configurable on a per statement basis.
As a Java developer, you may have had your database administrator walk up to you and recommend a higher value - raising the fetch size is a common knob in database application performance tuning.
While this sounds like good advice in theory, in practice the application server may run into OOM errors due to increased memory demand.
Interestingly, with JDBC 12c, Oracle announced new practices in memory management that should make feasible what may have been a risky endeavour before. Does the implementation live up to the promise?