mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-66327 pgsql DML: Update get_records_sql to consume less memory
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.
- Loading branch information
1 parent
414eca8
commit 66fa73d
Showing
1 changed file
with
12 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters