Laravel Eloquent ORM可以检索的最大行数 [英] Laravel Eloquent ORM maximum rows it could retrieve

查看:427
本文介绍了Laravel Eloquent ORM可以检索的最大行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表,大约35000行,我想检索它和var_dump所有的行,但我不能。

I have a table with about 35,000 rows, I want to retrieve it and var_dump all the rows but I could not.

然后我限制行数2000,这是好的。

Then I limit the number of rows by 2000, that is alright.

问题是,Laravel雄辩限制行数每次检索或硬件问题?

What is the problem, is Laravel Eloquent limiting the number of row each time retrieve or is the hardware problem?

推荐答案

讨论后:您正在服务器上的内存限制...

After discussion: You're hitting the memory limit on the server...

解决方案是


  1. 增加限制,或

  2. 找到另一种处理用户的方式,每2000个用户例如...

第二个更具扩展性,您应该问自己的问题是

the second is more scalable, the question you should ask yourself is


当我有1000倍的用户数时会发生什么?

这篇关于Laravel Eloquent ORM可以检索的最大行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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