简体   繁体   中英

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?

根据我在这里看到的文档( fetchSize ),您似乎可以告诉MyBatis为其基础的JDBC连接使用非默认的获取大小。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM