+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.
0 commit comments