Symfony 5学说齐平慢了
我只是想知道为什么随着时间的推移更新唱片(齐平)会减慢。 例如,如果我想检查mulitple记录并将它们与彼此进行比较,并且在比较之后更新了诸如setCompared(true)之类的列。前1000张唱片既可以又快,但是在那之后,每次冲洗后的冲洗似乎会变慢。是否有这样的理由,例如它可以建立或其他原因。 flush()之后,我需要清除()。
有人对此有解释吗?
I was just wondering why updating a record (flush) slows down over time.
For example, if i want to check mulitple records and compare them with eachother and after comparisation update a column like setCompared(true);. The first 1000 records are fine and fast but after that, the flush seems like it slows down after each flush. Is there a reason for that, like maybe it builds up or something. Do i need to clear() after flush().
Does anyone have a explaination for that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该根据 Doctrine文档):
以下代码显示了一个插入10000个对象的示例,其批次大小为20。这意味着我们使用
flush()。
You should do something like this according to the Doctrine documentation) :
The following code shows an example for inserting 10000 objects with a batch size of 20. This means that we insert them 20 by 20 with the
flush()
.