May 2019
Intermediate to advanced
484 pages
11h 23m
English
SQL Server 2017 Cumulative Update 14 and SQL Server 2019 introduced a new XEvent named query_post_execution_profile, which can be used to collect the equivalent of an actual execution plan for all queries, much like the query_post_execution_showplan XEvent. Unlike the query_plan_profile XEvent, query_post_execution_profile is not bound to a query hint, but it also uses lightweight profiling by default. The following is an example session that uses this XEvent:
CREATE EVENT SESSION [PerfStats_LWP_Plan_All] ON SERVERADD EVENT sqlserver.query_post_execution_plan_profile( ACTION(sqlos.scheduler_id, sqlserver.database_id, sqlserver.is_system,sqlserver.plan_handle, sqlserver.query_hash_signed, sqlserver.query_plan_hash_signed, ...
Read now
Unlock full access