We have a client application that uses sp_executesql to execute queries. The queries are parameterized. When we monitor via Extended Events, we regularly see a difference between the number of logical reads between the sp_statement_completed and rpc_completed. The majority of cases has an equal number of logical reads. The difference is significant, e.g. 3000 versus more than 10000. The duration is also significantly lower in these cases, e.g. 20 ms versus 200 ms. What can be the cause of that? I mean, some sort of overhead in sp_executesql, then I would expect to see a difference in most cases, but that is not so. Note as well these queries all use the same plan (same plan handle, also same query hash). Could it be for example a recompile? I don't know the internals of SQL Server for that, but I wondered whether a recompile could result internally in logical reads and that it would explain the difference? Another cause?

