MDL-82606 filterlib: pass a row limit to recordset for performance
commitdb963dffe6674d61721aefd07b9007abcdfa5bd7
authorTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 25 Jul 2024 15:04:01 +0000 (25 16:04 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 6 Aug 2024 09:43:57 +0000 (6 10:43 +0100)
tree91ac8f05b6a3caf2a1931dddbf84690727e9411e
parent8a6e8563fdc9e9684ab628ea0274fd2277bc5265
MDL-82606 filterlib: pass a row limit to recordset for performance

On Postgres, at least, get_recordset_sql performs signficantly worse
if you don't pass a limit. So, we add a limit to the query, but one
that in enormously too large, so it should never have an effect.
(And, there is code to check we never hit the limit, to avoid subtle bugs.)
lib/filterlib.php