We just regularly check our slow queries dashboard, fix it (or well let an LLM work on it) and then move on.
Detecting is easy if you’re iterating over a proxy collection