{"id":390598,"date":"2024-06-29T09:20:21","date_gmt":"2024-06-29T09:20:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=390598"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T09:20:21","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=390598","title":{"rendered":"<span>SQL Server 2022: \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u044f Extended Events \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e Extended Events \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (workload)? \u042f \u043c\u043d\u043e\u0433\u043e \u043f\u0438\u0441\u0430\u043b \u043e Extended Events \u0438 \u0431\u044b\u043b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043a\u043e\u043c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b SQL Trace \u0434\u0430\u0436\u0435 \u0434\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043d\u0430 <a href=\"http:\/\/SQLskills.com\">SQLskills.com<\/a>. \u041d\u043e \u0445\u043e\u0442\u044c Extended Events \u0438 \u0434\u0430\u044e\u0442 \u043d\u0430\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u043c\u0438, \u0432\u0441\u0435 \u0436\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 (observation overheads) \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Extended Events.<\/p>\n<p><a href=\"https:\/\/sqlperformance.com\/2012\/10\/sql-trace\/observer-overhead-trace-extended-events\">\u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u201c\u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u201d \u0432 SQL Trace \u0438 Extended Events \u2014 SQLPerformance.com<\/a><\/p>\n<p>SQL Server 2022 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 Extended Events, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0440\u044f\u0434 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u0441\u0435\u0430\u043d\u0441, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0412 SQL Server 2022 \u0432 DMV <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/relational-databases\/system-dynamic-management-views\/sys-dm-xe-session-events-transact-sql?view=azuresqldb-current&amp;viewFallbackFrom=sql-server-ver16\">sys.dm_xe_session_events<\/a> \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0430\u043d\u0441\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\"><strong>\u0418\u043c\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\"><strong>\u0422\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\">event_fire_count<\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">bigint<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c (\u0431\u044b\u043b\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043e) \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0430\u043d\u0441\u0430. \u041d\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a SQL Server 2022 (16.x) \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\">event_fire_average_time<\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">bigint<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041d\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a SQL Server 2022 (16.x) \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\">event_fire_min_time<\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">bigint<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041d\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a SQL Server 2022 (16.x) \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\">event_fire_max_time<\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">bigint<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041d\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a SQL Server 2022 (16.x) \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>\u041d\u043e\u0432\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 sys.dm_xe_session_events \u0432 SQL Server 2022.<\/em><\/p>\n<p>\u0414\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, event_fire_count \u0438 event_fire_average_time, \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0442 \u0432\u0430\u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u0430 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 9708 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/t-sql\/database-console-commands\/dbcc-traceon-trace-flags-transact-sql?view=sql-server-ver16\">\u0424\u043b\u0430\u0433\u0438 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 (Transact-SQL) \u2014 SQL Server | Microsoft Learn<\/a><\/p>\n<p>\u042d\u0442\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438. \u042d\u0442\u043e\u0442 \u0444\u043b\u0430\u0433 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f global only, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DBCC TRACEON(9708, -1). \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0435\u0437 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0444\u043b\u0430\u0433\u043e\u043c:<\/p>\n<pre><code>SELECT s.name AS session_name,  event_name, event_fire_count, event_fire_average_time,  event_fire_min_time,  event_fire_max_time FROM sys.dm_xe_sessions AS s  INNER JOIN sys.dm_xe_session_events AS xse ON s.address = xse.event_session_address ORDER BY event_fire_max_time DESC<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6b4\/6cb\/e8c\/6b46cbe8c5481fb82d66c2d73ea94a52.png\" width=\"1024\" height=\"253\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6b4\/6cb\/e8c\/6b46cbe8c5481fb82d66c2d73ea94a52.png\"\/><\/figure>\n<p><em>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 extended events \u0431\u0435\u0437 \u0444\u043b\u0430\u0433\u0430 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 9708.<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/de6\/204\/68b\/de620468bd20b4d43f7fd2cfb0ce716a.png\" width=\"1024\" height=\"238\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de6\/204\/68b\/de620468bd20b4d43f7fd2cfb0ce716a.png\"\/><\/figure>\n<p><em>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 extended events \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0444\u043b\u0430\u0433\u043e\u043c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 9708.<\/em><\/p>\n<p>\u0424\u043b\u0430\u0433 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f global only, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DBCC TRACEON(9708, -1). \u0425\u043e\u0442\u044c \u044d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0445\u0432\u0430\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043e\u0431\u0449\u0435\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u0441\u0435\u0430\u043d\u0441\u043e\u0432 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u043e\u0435.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u044f \u0431\u044b\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0438 \u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0433\u043b\u0443\u043f\u043e\u0435 \u0441 \u044d\u0442\u0438\u043c \u0444\u043b\u0430\u0433\u043e\u043c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0435\u0430\u043d\u0441 \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c CrazyEvents, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b SELECT ALL \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u0441\u0435\u0430\u043d\u0441 \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u0435\u0434\u0435\u0431\u0430\u0436\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0435\u0433\u043e. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u0433\u043f\u043e\u0441\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0432\u0435\u0434\u044c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u043e \u0433\u043b\u0443\u043f\u0430\u044f \u0438\u0434\u0435\u044f, \u0438 \u0432\u044b \u0441\u0430\u043c\u0438 \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e\u0442 \u0441\u0435\u0430\u043d\u0441 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435, \u0435\u0441\u043b\u0438 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a\u043e \u043c\u043d\u0435 \u0432 \u043f\u0441\u0438\u0445\u0443\u0448\u043a\u0435. \u0412\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c \u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043e \u043c\u0438\u043d\u0443\u0442, \u043f\u043e\u043a\u0430 \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043a \u0441\u0435\u0430\u043d\u0441\u0443. \u042f \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0430\u043d\u0441\u0430 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0432 SSMS \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u0443\u043b\u0435\u0440\u044b \u043c\u043e\u0435\u0433\u043e \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0433\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043b\u0438\u0448\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u044d\u0442\u0438\u043c \u0431\u043b\u043e\u0433\u043f\u043e\u0441\u0442\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u0435\u043d\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0434\u0438\u0432\u0438\u043b\u0438. \u042f \u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u043b, \u0447\u0442\u043e 4.5 \u043c\u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f wait_info \u0432\u044b\u043f\u043b\u044b\u0432\u0435\u0442 \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0438\u0437 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e18\/fda\/74a\/e18fda74af55e01437f684d2d211144a.png\" width=\"1024\" height=\"463\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e18\/fda\/74a\/e18fda74af55e01437f684d2d211144a.png\"\/><\/figure>\n<p><em>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 extended event \u0441\u0435\u0430\u043d\u0441\u0430 CrazyEvents<\/em><\/p>\n<p>\u0425\u043e\u0442\u044c \u043c\u043d\u0435 \u043f\u043e\u043a\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0444\u043b\u0430\u0433 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434, \u0447\u0442\u043e Microsoft \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f Extended Events, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043b\u0443\u0447\u0448\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0430\u043d\u0441\u0430\u043c\u0438 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438. \u0414\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438, \u0435\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u0432 \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u043a\u0440\u043e\u043c\u0435 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0437\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u0441\u0435\u0430\u043d\u0441\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0432\u043b\u0438\u044f\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<hr\/>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0411\u0414, \u043a\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438 \u0432 \u0447\u0435\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0430. \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043d\u0430  <a href=\"https:\/\/otus.pw\/GRW6\/\">\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a<\/a>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c \u0432 MS SQL server, \u0432 \u0447\u0435\u043c \u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0438 \u0434\u043b\u044f \u043a\u0430\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>\u0423\u0440\u043e\u043a \u0441\u043e\u0441\u0442\u043e\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0443\u0440\u0441\u0430 &#171;MS SQL Server Developer&#187;. \u0423\u0441\u043f\u0435\u0432\u0430\u0439\u0442\u0435 <a href=\"https:\/\/otus.pw\/GRW6\/\">\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/a> \u2014 \u0443\u0440\u043e\u043a \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u0443\u0436\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0435\u0447\u0435\u0440\u043e\u043c.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/725590\/\"> https:\/\/habr.com\/ru\/articles\/725590\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e Extended Events \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (workload)? \u042f \u043c\u043d\u043e\u0433\u043e \u043f\u0438\u0441\u0430\u043b \u043e Extended Events \u0438 \u0431\u044b\u043b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043a\u043e\u043c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b SQL Trace \u0434\u0430\u0436\u0435 \u0434\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043d\u0430 <a href=\"http:\/\/SQLskills.com\">SQLskills.com<\/a>. \u041d\u043e \u0445\u043e\u0442\u044c Extended Events \u0438 \u0434\u0430\u044e\u0442 \u043d\u0430\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u043c\u0438, \u0432\u0441\u0435 \u0436\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 (observation overheads) \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Extended Events.<\/p>\n<p><a href=\"https:\/\/sqlperformance.com\/2012\/10\/sql-trace\/observer-overhead-trace-extended-events\">\u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u201c\u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u201d \u0432 SQL Trace \u0438 Extended Events \u2014 SQLPerformance.com<\/a><\/p>\n<p>SQL Server 2022 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 Extended Events, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0440\u044f\u0434 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u0441\u0435\u0430\u043d\u0441, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0412 SQL Server 2022 \u0432 DMV <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/relational-databases\/system-dynamic-management-views\/sys-dm-xe-session-events-transact-sql?view=azuresqldb-current&amp;viewFallbackFrom=sql-server-ver16\">sys.dm_xe_session_events<\/a> \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0430\u043d\u0441\u0430:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\"><strong>\u0418\u043c\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\"><strong>\u0422\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\">event_fire_count<\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">bigint<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c (\u0431\u044b\u043b\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043e) \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0430\u043d\u0441\u0430. \u041d\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a SQL Server 2022 (16.x) \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\">event_fire_average_time<\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">bigint<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041d\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a SQL Server 2022 (16.x) \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\">event_fire_min_time<\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">bigint<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041d\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a SQL Server 2022 (16.x) \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"192\" width=\"192\">\n<p align=\"left\">event_fire_max_time<\/p>\n<\/td>\n<td data-colwidth=\"76\" width=\"76\">\n<p align=\"left\">bigint<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. \u041d\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a SQL Server 2022 (16.x) \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><em>\u041d\u043e\u0432\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 sys.dm_xe_session_events \u0432 SQL Server 2022.<\/em><\/p>\n<p>\u0414\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, event_fire_count \u0438 event_fire_average_time, \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0442 \u0432\u0430\u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u0430 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 9708 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/t-sql\/database-console-commands\/dbcc-traceon-trace-flags-transact-sql?view=sql-server-ver16\">\u0424\u043b\u0430\u0433\u0438 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 (Transact-SQL) \u2014 SQL Server | Microsoft Learn<\/a><\/p>\n<p>\u042d\u0442\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438. \u042d\u0442\u043e\u0442 \u0444\u043b\u0430\u0433 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f global only, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DBCC TRACEON(9708, -1). \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0435\u0437 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0444\u043b\u0430\u0433\u043e\u043c:<\/p>\n<pre><code>SELECT s.name AS session_name,  event_name, event_fire_count, event_fire_average_time,  event_fire_min_time,  event_fire_max_time FROM sys.dm_xe_sessions AS s  INNER JOIN sys.dm_xe_session_events AS xse ON s.address = xse.event_session_address ORDER BY event_fire_max_time DESC<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p><em>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 extended events \u0431\u0435\u0437 \u0444\u043b\u0430\u0433\u0430 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 9708.<\/em><\/p>\n<figure class=\"full-width\"><\/figure>\n<p><em>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 extended events \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0444\u043b\u0430\u0433\u043e\u043c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 9708.<\/em><\/p>\n<p>\u0424\u043b\u0430\u0433 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f global only, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e DBCC TRACEON(9708, -1). \u0425\u043e\u0442\u044c \u044d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0445\u0432\u0430\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439, \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043e\u0431\u0449\u0435\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u0441\u0435\u0430\u043d\u0441\u043e\u0432 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u043e\u0435.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u044f \u0431\u044b\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0438 \u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0433\u043b\u0443\u043f\u043e\u0435 \u0441 \u044d\u0442\u0438\u043c \u0444\u043b\u0430\u0433\u043e\u043c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0435\u0430\u043d\u0441 \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c CrazyEvents, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b SELECT ALL \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u0441\u0435\u0430\u043d\u0441 \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u0435\u0434\u0435\u0431\u0430\u0436\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0435\u0433\u043e. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u0433\u043f\u043e\u0441\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0432\u0435\u0434\u044c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u043e \u0433\u043b\u0443\u043f\u0430\u044f \u0438\u0434\u0435\u044f, \u0438 \u0432\u044b \u0441\u0430\u043c\u0438 \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e\u0442 \u0441\u0435\u0430\u043d\u0441 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435, \u0435\u0441\u043b\u0438 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a\u043e \u043c\u043d\u0435 \u0432 \u043f\u0441\u0438\u0445\u0443\u0448\u043a\u0435. \u0412\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c \u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043e \u043c\u0438\u043d\u0443\u0442, \u043f\u043e\u043a\u0430 \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043a \u0441\u0435\u0430\u043d\u0441\u0443. \u042f \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0430\u043d\u0441\u0430 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0432 SSMS \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u0443\u043b\u0435\u0440\u044b \u043c\u043e\u0435\u0433\u043e \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0433\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0438\u0441\u044c \u043b\u0438\u0448\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u044d\u0442\u0438\u043c \u0431\u043b\u043e\u0433\u043f\u043e\u0441\u0442\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u0435\u043d\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0434\u0438\u0432\u0438\u043b\u0438. \u042f \u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u043b, \u0447\u0442\u043e 4.5 \u043c\u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f wait_info \u0432\u044b\u043f\u043b\u044b\u0432\u0435\u0442 \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0438\u0437 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p><em>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 extended event \u0441\u0435\u0430\u043d\u0441\u0430 CrazyEvents<\/em><\/p>\n<p>\u0425\u043e\u0442\u044c \u043c\u043d\u0435 \u043f\u043e\u043a\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0444\u043b\u0430\u0433 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0434, \u0447\u0442\u043e Microsoft \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f Extended Events, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043b\u0443\u0447\u0448\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0435\u0430\u043d\u0441\u0430\u043c\u0438 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u044b\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438. \u0414\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438, \u0435\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u0432 \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u043a\u0440\u043e\u043c\u0435 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0437\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u0441\u0435\u0430\u043d\u0441\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0432\u043b\u0438\u044f\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<hr\/>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0411\u0414, \u043a\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438 \u0432 \u0447\u0435\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0430. \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043d\u0430  <a href=\"https:\/\/otus.pw\/GRW6\/\">\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a<\/a>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c \u0432 MS SQL server, \u0432 \u0447\u0435\u043c \u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0438 \u0434\u043b\u044f \u043a\u0430\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>\u0423\u0440\u043e\u043a \u0441\u043e\u0441\u0442\u043e\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0443\u0440\u0441\u0430 &#171;MS SQL Server Developer&#187;. \u0423\u0441\u043f\u0435\u0432\u0430\u0439\u0442\u0435 <a href=\"https:\/\/otus.pw\/GRW6\/\">\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/a> \u2014 \u0443\u0440\u043e\u043a \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u0443\u0436\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0435\u0447\u0435\u0440\u043e\u043c.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/725590\/\"> https:\/\/habr.com\/ru\/articles\/725590\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-390598","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/390598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=390598"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/390598\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=390598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=390598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=390598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}