[PR #955] iteration risk note #8959

Closed
opened 2026-01-22 16:02:30 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/955

State: closed
Merged: Yes


instead of loading the whole result into memory at once

is not the full truth.

There is a certain risk of processes getting killed due to memory allocation with large iteration. This is caused by result buffering of the client. It is not always being visible to PHP as http://www.php.net/manual/en/mysqlinfo.concepts.buffering.php suggests.

This is only a proposal for discussion as I am not certain how to best add the information or if to add it at all (was it obvious before?). Is buffered iteration even a good suggestion for anything but small sets?

On a side-note: is there a way to run unbuffered queries with Doctrine?

**Original Pull Request:** https://github.com/doctrine/orm/pull/955 **State:** closed **Merged:** Yes --- > instead of loading the whole result into memory at once is not the full truth. There is a certain risk of processes getting killed due to memory allocation with large iteration. This is caused by result buffering of the client. It is not always being visible to PHP as http://www.php.net/manual/en/mysqlinfo.concepts.buffering.php suggests. This is only a proposal for discussion as I am not certain how to best add the information or if to add it at all (was it obvious before?). Is buffered iteration even a good suggestion for anything but small sets? On a side-note: is there a way to run unbuffered queries with Doctrine?
admin added the pull-request label 2026-01-22 16:02:30 +01:00
admin closed this issue 2026-01-22 16:02:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8959