It has nothing to do with concurrency.
It is due to the occurrence of duplicate values in subsequent insertions triggered by the trigger, rather than the occurrence of duplicate values in the insertions to WorkTABLE_xxxxxx.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The issue at hand involves encountering a "Cannot insert duplicate key in object" error during parallel execution of queries by multiple threads. The error indicates that duplicate keys are being attempted to be inserted into the database object, despite the absence of duplicate data. This problem arises due to concurrent execution of the same query by multiple threads simultaneously. It is suspected that the parallelism inherent in this scenario is causing contention, leading to the duplication of keys. However, the proposed solution of setting MAXDop = 1 would adversely impact performance, which is undesirable. Therefore, an alternative solution is sought to resolve the issue without sacrificing performance.
It has nothing to do with concurrency.
It is due to the occurrence of duplicate values in subsequent insertions triggered by the trigger, rather than the occurrence of duplicate values in the insertions to WorkTABLE_xxxxxx.