Skip to content

Commit a1ba61d

Browse files
authored
Edit review
1 parent 8cff5f8 commit a1ba61d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

support/sql/database-engine/performance/troubleshoot-blocking-caused-compile-locks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ The solution is to drop and create the procedure by using the same letter case a
8484

8585
### Stored procedure is invoked as a Language event
8686

87-
If you try to execute a stored procedure as a Language Event instead of as an RPC, SQL Server must parse and compile the language event query, determine that the query is trying to execute the particular procedure, and then try to find a plan in cache for that procedure. To avoid this situation in which SQL Server must parse and compile the language event, make sure that the query is sent to SQL Server as an RPC. For example, in .NET code, you would use `SqlCommand.CommandType.StoredProcedure` to ensure an RPC event.
87+
If you try to execute a stored procedure as a Language Event instead of as an RPC, SQL Server must parse and compile the language event query, determine that the query is trying to execute the particular procedure, and then try to find a plan in cache for that procedure. To avoid this situation in which SQL Server must parse and compile the language event, make sure that the query is sent to SQL Server as an RPC. For example, in .NET code, you can use `SqlCommand.CommandType.StoredProcedure` to ensure an RPC event.
8888

8989
### Stored procedure or sp_executesql uses a string parameter greater than 8 KB
9090

91-
If you call a stored procedure or [sp_executesql](/sql/relational-databases/system-stored-procedures/sp-executesql-transact-sql) and pass a string parameter with a size larger than 8 KB, SQL Server uses a binary large objects (BLOB) data type to store the parameter. As a result, the query plan for this execution isn't persisted in plan cache. Therefore, each and every execution of the stored procedure or `sp_executesql` has to acquire a compile lock to compile a new plan. This plan is discarded when execution completes. For more information, see the note in [Execution plan caching and reuse](/sql/relational-databases/query-processing-architecture-guide) regarding string literals larger than 8 KB in size. To avoid the compile lock in this scenario, reduce the size of the parameter to less than 8 KB.
91+
If you call a stored procedure or [sp_executesql](/sql/relational-databases/system-stored-procedures/sp-executesql-transact-sql) and pass a string parameter larger than 8 KB, SQL Server uses a binary large object (BLOB) data type to store the parameter. As a result, the query plan for this execution isn't persisted in the plan cache. Therefore, each execution of the stored procedure or `sp_executesql` has to acquire a compile lock to compile a new plan. This plan is discarded when the execution is complete. For more information, see the note in [Execution plan caching and reuse](/sql/relational-databases/query-processing-architecture-guide#execution-plan-caching-and-reuse) regarding string literals larger than 8 KB. To avoid the compile lock in this scenario, reduce the size of the parameter to less than 8 KB.
9292

9393
## References
9494

0 commit comments

Comments
 (0)