quickperf icon indicating copy to clipboard operation
quickperf copied to clipboard

Add @DisableSelfJoin and @EnableSelfJoin

Open jeanbisutti opened this issue 4 years ago • 0 comments

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.

jeanbisutti avatar Apr 05 '20 16:04 jeanbisutti