While using prosopite on an application with many N+1s, I wanted to focus my efforts on the N+1s with the most associated queries, so I added a count of queries.
I also found that I really only needed one query per N+1 to debug each issue, so I added a configuration to limit the number of queries logged.
The result looks something like this:
W, [2023-11-09T17:48:23.795072 #338497] WARN -- : N+1 queries detected (20):
SELECT "legs".* FROM "legs" WHERE "legs"."chair_id" = ? ORDER BY "legs"."id" ASC LIMIT ?
Call stack:
While using prosopite on an application with many N+1s, I wanted to focus my efforts on the N+1s with the most associated queries, so I added a count of queries.
I also found that I really only needed one query per N+1 to debug each issue, so I added a configuration to limit the number of queries logged.
The result looks something like this:
with this configuration:
I decided to make them both optional in case anyone depends on the existing format.