学说和大量数据 [英] doctrine and large amount of data

查看:24
本文介绍了学说和大量数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个返回约 50k 行的查询,似乎学说将整个结果放入内存中超出内存限制(128M)我发现节省一些内存的唯一解决方案是

i have a query that returns ~50k rows, seems like doctrine put this whole result into memory what exceeds memory limit(128M) the only solution i found that saves some memory is

$result->execute(array(), Doctrine_Core::HYDRATE_NONE);

但仍然超出限制,有没有什么方法可以一次读一行的教义?

but it still exceeds the limit, is there any way to read one row at a time with doctrine ?

推荐答案

Doctrine 文档 - 13. 批处理

更新:对于 1.2,请查看此页面:http://docs.doctrine-project.org/projects/doctrine1/en/latest/en/manual/data-hydrators.html

Update: For 1.2 check out this page: http://docs.doctrine-project.org/projects/doctrine1/en/latest/en/manual/data-hydrators.html

在按需"标题下,您会找到答案.

Under the "On Demand" heading you will find the answer.

这篇关于学说和大量数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆