Download presentation
Presentation is loading. Please wait.
1
Hidden Gems of SQL Server 2016
Denis Reznik Hidden Gems of SQL Server 2016
2
Thank you to our AWESOME sponsors!
3
About Me Denis Reznik Kyiv, Ukraine Data Architect at Intapp, Inc.
Microsoft Data Platform MVP Co-Founder of Ukrainian Data Community Kyiv (PASS Chapter) PASS Regional Mentor, Central and Eastern Europe Co-author of “SQL Server MVP Deep Dives vol. 2”
4
SQL Server 2016 Killer Features Hidden Features Query Store
Temporal Tables JSON PolyBase Stretch Database R Services Always Encrypted Hidden Features Statistics Auto-Update Input Buffers Lightweight Profiling Session Waits Functions Stats Query Hints
5
Statistics Auto-Update
6
? Statistics SELECT * FROM Users WHERE Id BETWEEN 2100 AND 2500
800 2000 2800 4500 5400
7
Statistics Auto-Update
DEMO Statistics Auto-Update
8
Statistics Update SQL Server 2014 and lower default behavior:
20% of rows + 500 SQL Server 2016 Dynamic threshold for tables with rows TF 2371 for lower versions
9
Input Buffers
10
Input Buffers session_id = 65 SELECT * FROM Users WHERE Id = 123
EXEC = 1 session_id = 65 SELECT * FROM Users WHERE Id = 123 session_id = 65 Session 65 INPUT BUFFER: EXEC = 1 SELECT * FROM Users WHERE Id = 123
11
DEMO Input Buffers
12
Lightweight Profiling
13
Lightweight Profiling
SQL Server 2014 – sys.dm_exec_query_profiles SQL Server 2016/2014 SP1 – Live Query Statistics Enable LQS in SSMS SET STATISTICS XML ON SET STATISTICS PROFILE ON query_post_execution_showplan event SQL Server 2016/2014 SP2 - query_thread_profile event SQL Server 2016 SP1 – query_thread_profile/TF 7412 Lightweight query execution profiling Session Level Server Level
14
Lightweight Profiling
DEMO Lightweight Profiling
15
Session Waits
16
LCK_M_* Waits Schedulers Runnable Queue Users 2 3 2 1 Suspended Queue
Id Name 1 John Snow 2 Peter Partner 3 Jesse Pinkman 4 Jane Dow Id Name 1 John Snow 2 Peter Partner 3 Kirill Nenahov 4 Jane Dow 3 2 1 X S Suspended Queue 1 2 2 LCK_M_X 1 SELECT * FROM Users WHERE Name LIKE 'K%' LCK_M_X 2 UPDATE Users SET Name = 'Jesse Pinkman' WHERE Id = 3
17
DEMO Session Waits
18
Functions Stats
19
Scalar Functions
20
DEMO Functions Stats
21
Query Hints
22
Statistics SELECT * FROM Users u INNER JOIN Posts p ON u.Id = p.OwnerUserId WHERE u.DisplayName LIKE 'Jeff%' Users A G L S T ZZZZ Posts 1 800 2000 2800 4500 5400
23
DEMO Query Hints
24
SUMMARY Statistics Auto-Update Input Buffers Lightweight Profiling
Session Waits Functions Stats Query Hints
25
Thank You! Denis Reznik Twitter: @denisreznik
Blog: Facebook: LinkedIn:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.