Your slow query log will never show you an N+1. Your full log will.Each query of an N+1 is fast, so log_min_duration_statement never catches it. Log everything for an hour and the loops are right there.5 min read·yourreferralcodes.hashnode.dev1d ago
I built a tiny proxy that finds N+1 queries in any Postgres appN+1 queries are the bug that never shows up in your slow query log. Each query is fast (0.2 ms, 0.3 ms), so auto_explain and log_min_duration_statement stay quiet. But your endpoint runs 50 of them in4 min read·yourreferralcodes.hashnode.dev6d ago
Referral codes are everywhere. I built a site to share them and compare which ones are actually worth itI built a site to find and share referral codes and compare rewards by effort, so you can tell which offers are actually worth it.2 min read·yourreferralcodes.hashnode.devOct 19