mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
It's more memory efficient to use `pg_fetch_assoc` for each row than to call `pg_fetch_all` and release memory immediately. This is because we can treat the assoc fetch like an iterator and it only fetches the current record into memory one at a time, whilst the all fetch fetches all records and never unsets them. Attempting to unset them is extremely time consuming.