Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(statistics): use subquery instead of join to avoid cartesian product
The way we filter in the statistics view, any added filter (that affects reports) adds a "dimension" to the cartesian product, exploding the total number of hours reported. Instead of using JOIN, we do EXISTS(SUBQUERY) now, which should avoid this issue. Might be a tiny bit slower, but let's try to make it correct first, then fast.
- Loading branch information