简体   繁体   English

用mybatis缓冲结果集

[英]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. 我需要使用MyBatis用Java开发一个程序,该程序从数据库中读取记录并将它们写入文件。 The query I am using retrieves a large amount of data and there is a risk of OutOfMemoryExceptions . 我正在使用的查询检索了大量数据,并且存在OutOfMemoryExceptions的风险。

How do I tell MyBatis to process the records without running out of memory? 如何告诉MyBatis处理记录而不会耗尽内存?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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