Optimize this one query in one specific file.
Anonimo
The query was initially filtering 30 entities at a time after retrieving all records from the database. I reversed the approach and modified it to retrieve only 30 entities at a time directly from the database.