Skip to Main Content
Learn T-SQL Querying
book

Learn T-SQL Querying

by Pedro Lopes, Pam Lahoud
May 2019
Intermediate to advanced content levelIntermediate to advanced
484 pages
11h 23m
English
Packt Publishing
Content preview from Learn T-SQL Querying

The query_thread_profile XEvent

SQL Server 2016 Service Pack 1 introduced a new XEvent named query_thread_profile. Unlike the query_post_execution_showplan XEvent, which uses only Standard Profiling, query_thread_profile uses lightweight profiling by default. Also, unlike query_post_execution_showplan, query_thread_profile doesn't output a query execution plan as a single showplan XML—it outputs one event per-operator and thread with the same execution statistics that are expected in a query execution plan. This means that it can be quite verbose, but since it's based on lightweight profiling rather than Standard Profiling, it can be used for a longer period of time than was possible with query_post_execution_showplan.

The following example ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn T-SQL Querying - Second Edition

Learn T-SQL Querying - Second Edition

Pedro Lopes, Pam Lahoud
SQL Server T-SQL Recipes, Fourth Edition

SQL Server T-SQL Recipes, Fourth Edition

Jason Brimhall, Jonathan Gennick, Wayne Sheffield

Publisher Resources

ISBN: 9781789348811Supplemental Content