Skip to content
Paul Bunyan Message Logger by Diamond Sierra

PB-2502: The same query ran many times in one request

Paul Bunyan code PB-2502 (Warning): The same query ran many times in one request. What it means and what to do.

Updated · By Diamond Sierra

The Codes screen: every PB code found on the site, with counts
On this page

What it means

A request ran 100 or more queries and at least one query shape repeated five or more times.

What to do

Usually a query inside a loop. Fetch the rows once before the loop, or keep the result in a variable or the object cache.

Details

CodeSeverityGroup
PB-2502WarningDatabase