Find the repeated query
Use query logs, tracing, or database metrics to locate requests that issue many similar statements. Compare the number of queries with the number of returned records and inspect which relationship or field triggers the repeated lookup.
A development dataset with only a few records can hide the problem. Reproduce it with realistic list sizes and check whether serialization, templates, or helper functions access relationships implicitly.
Load related data deliberately
Depending on the data model and database, use a join, a batch lookup with an appropriate key set, or an ORM eager-loading feature. Choose a method that avoids both per-row queries and an oversized result with duplicated data.
Measure total query count, returned rows, payload size, and latency before and after. Add a regression check for representative list sizes, but keep pagination and authorization filters intact when changing how related records are fetched.