With the introduction of contained databases in SQL Server, the database engine always performs a containment check before executing stored procedures. On high-end computers with multiple cores, this check may cause a decrease in performance because of internal spinlock contention, occasionally causing "non-yielding scheduler" errors.
This problem was first fixed in the following cumulative update for SQL Server:
- Cumulative Update 1 for SQL Server 2016 SP1
- Cumulative Update 2 for SQL Server 2016
- Cumulative Update 1 for SQL Server 2014 SP2
- Cumulative Update 8 for SQL Server 2014 Service Pack 1
About cumulative updates for SQL Server
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.