doctrine and large amount of data(学说和大量数据)
问题描述
我有一个返回约 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.
这篇关于学说和大量数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:学说和大量数据
基础教程推荐
- 如何替换eregi() 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
