4 ms·
> Django Querycount This seems pretty much like a must have when you think about it: so where’s the equivalents for .NET, Java, Node, Go, Rails and others? I
by KronisLV 2y ago
> Django Querycount
This seems pretty much like a must have when you think about it: so where’s the equivalents for .NET, Java, Node, Go, Rails and others?
I can’t believe that every web framework that has an ORM or just a connection to the database doesn’t provide summaries like this.
At best, you can look into some tracing options that might reveal where the the execution time went.
I do hope that there are options out there (or might have to try and fail writing something myself) because I can immediately think of a few legacy projects where N+1 is prevalent, maybe even in the new code, depending on who wrote it; some people genuinely believe that using the service pattern and a lot of DB calls for a single API request is okay.
- danpalmer 2y agoEvery web framework I've used has had an equivalent, they're widely available. Specifically I've seen this same pattern for .NET MVC and for Rails. I've never looked for one of these and not found it.
- KronisLV 2y agoThat’s odd because even in .NET the common suggestion I’ve heard is to just crank the logging level and try to extract data from that, e.g. https://learn.microsoft.com/en-us/ef/core/logging-events-diagnostics/ https://learn.microsoft.com/en-us/ef/core/logging-events-dia... Or the equivalent in other stacks as well, for example with Hibernate or myBatis logging in Java, almost never a pretty summary table of how many DB actions of what kind were called per API request. I might need to dig around more!