This is a side effect of the histogram target design. It uses a hashing function to aggregate entities into buckets. Therefore, depending on the selection of the aggregation field, two objects may be stored in the same bucket, and they will both be shown under the name of the one executed first.
This can occur even when you use the NO_EVENT_LOSS parameter. Assume the following
- You set up an Extended Events session, using histogram as target and grouping by object_id, to collect stored procedures execution.
- Then, you execute Stored Procedure A.
- Then, you execute Stored Procedure B.
If both Stored Procedures object_id return the same value for the hash function, histogram will show Stored Procedure A being executed two times, and Stored Procedure B will not appear.
Article ID: 2966940 - Last Review: 28 Jul 2014 - Revision: 1