You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When one implements a SELECT N+1 query how it manifests is that the same query (apart from the parameters) will be executed multiple times during page load. While not every duplicated query is a problem, we could add a feature to detect such queries and fail the given test. A per-test configurable threshold would be a good start (e.g. "fail if any query is executed >3 times").
An approach would be to use the Orchard Core Mini Profiler feature for this. A better one would be to implement our similar profiling logic to tap into the OC app since that wouldn't potentially break the UI (as the Mini Profile toolbar can). Perhaps it's possible to get the info out of Mini Profiler without showing the UI.
Similarly, we could have a mechanism to detect queries that fetch too many rows but probably there are no such simple heuristics for that (otherwise, we could do the same approach and have a configurable threshold).
When one implements a
SELECT
N+1 query how it manifests is that the same query (apart from the parameters) will be executed multiple times during page load. While not every duplicated query is a problem, we could add a feature to detect such queries and fail the given test. A per-test configurable threshold would be a good start (e.g. "fail if any query is executed >3 times").An approach would be to use the Orchard Core Mini Profiler feature for this. A better one would be to implement our similar profiling logic to tap into the OC app since that wouldn't potentially break the UI (as the Mini Profile toolbar can). Perhaps it's possible to get the info out of Mini Profiler without showing the UI.
Similarly, we could have a mechanism to detect queries that fetch too many rows but probably there are no such simple heuristics for that (otherwise, we could do the same approach and have a configurable threshold).
Common APIs for OrchardCMS/OrchardCore#12251 can help here too.
Jira issue
The text was updated successfully, but these errors were encountered: