-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
流式查询是不是一次读取全部数据到内存了? #5849
Labels
Comments
不是,具体可以查ResultHandler原理 |
但是200W没有分页的情况单纯的依赖流式查询,确实发生了内存溢出,是不是有其他需要注意的文档中没有写? |
没什么其他要注意点,这要取决你查出来后面做了什么,你又把这数据依次保存在list里什么的,就只能调整你的堆内存,正常情况下是处理一条丢一条. |
@jyjey 大佬解决了吗,我现在也是流式查询百万条数据,内存上涨明显,且没有被回收 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当前使用版本(必填,否则不予处理)
mybatisplus:3.5.4.1
spring:2.7.6
该问题是如何引起的?(确定最新版也有问题再提!!!)
使用流式查询27w数据时表象正常,200W数据时还是发生了内存溢出
打印sql发现多次执行查询语句,怀疑是不是先加载了全部数据到内存,然后再逐条读取的?
重现步骤(如果有就写完整)
报错信息
内存溢出
The text was updated successfully, but these errors were encountered: