quickperf
quickperf copied to clipboard
Add @DisableSelfJoin and @EnableSelfJoin
Description
In many cases, SQL self-joins don't seem to be the best option for performance: Markus Winand 1, Markus Winand 2.
The use of a window function or a pivot may be a better alternative. With window function we have also to pay attention to excessive sorts.
A test with @DisableSelfJoin will fail if at least one SQL self-join is detected. The user may attribute a global scope to this annotation. In some specific cases, @DisableSelfJoin can be disabled at method level with @EnableSelfJoin.