Reputation: 1
I need to develop a program in java with MyBatis, which reads records from the database and writes them to a file. The query I am using retrieves a large amount of data and there is a risk of OutOfMemoryExceptions
.
How do I tell MyBatis to process the records without running out of memory?
Upvotes: 0
Views: 882
Reputation: 3222
Based on the documentation I see here (fetchSize), it looks like you can tell MyBatis to use a non-default fetch size for its underlying JDBC connections.
Upvotes: 1