How to Set the fetch size in the jasperreports.properties file to modify the number of rows to fetch

Set the fetch size in the jasperreports.properties file to modify the number of rows to fetch

In the jasperreports.properties file you can set net.sf.jasperreports.jdbc.fetch.size=n, where n is the number of rows to fetch at a time - optimizing this can reduce the number of trips to the database.

For instance, if this value isn't set, Oracle uses a default value of 10 and DB2 uses 32 - by setting it to something higher, like 1000, you could conceivably reduce the round-trips to the database by more than two-thirds.


Other Performance Tips:

Feedback
randomness