user3498354
user3498354

Reputation: 1

Buffer a result set with mybatis

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

Answers (1)

Ryan Ransford
Ryan Ransford

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

Related Questions