Hidden Gems of SQL Server 2016

Slides:



Advertisements
Similar presentations
Virtual techdays INDIA │ 9-11 February 2011 virtual techdays Auditing Made Easy: Change Tracking and Change Data Capture Pinal Dave │ Technology Evangelist,
Advertisements

Auditing Database DDL Changes with SQLVer. About PASS The PASS community encompasses everyone who uses the Microsoft SQL Server or Business Intelligence.
Intro to SQL Server Performance Tuning By Robert Biddle.
Virtual techdays INDIA │ august 2010 Developing with SQL Server Spatial & Deep Dive into Spatial Indexing Pinal Dave │ Mentor, Solid Quality Mentors.
Understanding SQL Server 2008 Change Data Capture Bret Stateham Training Manager Vortex Learning Solutions blogs.netconnex.com.
Matt Lavery & Joanna Podgoetsky Being a DBA is cool again with SQL 2016 DAT335 A.
Pinal Dave Mentor | Solid Quality India |
Locking Internals By Amit R S Bansal Director, Principal Consultant & Trainer |
How to kill SQL Server Performance Håkan Winther.
What is Data Science and Who is Data Scientist
Deadlocks 3.0. Final Edition. Everything that developer needs to know Denis Reznik Microsoft SQL Server MVP Director of R&D at Intapp Kyiv.
SQL Server Deep Dive Denis Reznik Data Architect at Intapp.
No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3
STANDARD EDITION USEFUL FEATURES FOR THE REST OF US?
Session Name Pelin ATICI SQL Premier Field Engineer.
SQL Server Performance Tuning
Denis Reznik Data Architect, Intapp, Inc. Microsoft Data Platform MVP
An introduction to Wait Statistics
Parameter Sniffing in SQL Server Stored Procedures
Execution Planning for Success
Thank You! #sqlsatdnipro Denis
Building a Performance Monitoring System using XEvents and DMVs
Building a Performance Monitoring System using XEvents and DMVs
Reading execution plans successfully
Encryption in SQL Server
Design Seamless Upgrades to SQL Server 2016 with Query Store
Summit Nashville /28/2018 8:42 PM
Performance Tuning 101: Parallelism
Reading Execution Plans Successfully
SQL Server Security Mistakes Everyone Makes
Performance Monitoring Using Extended Events, DMVs & Query Store
Query Execution Expectation-Reality Denis Reznik
Building a Performance Monitoring System using XEvents and DMVs
Please support our sponsors
Cardinality Estimator 2014/2016
dbatools - PowerShell and SQL Server Working Together
It’s Always a Hard Choice
SQL Server Mythconceptions And Mythteries
Rob Farley, LobsterPot Solutions
Everything you ever wanted to ask but were too shy
SQL Server 2014 Hidden Treasures Denis Reznik Microsoft SQL Server MVP
Hidden Gems of SQL Server 2014
Statistics: What are they and How do I use them
Hidden gems of SQL Server 2016
Securing SQL Server Processes with Certificates
Reading Execution Plans Successfully
SQL Server Performance Tuning Nowadays
SQLCmd Mode The T-SQL Easy Button
SQL Server Mythconceptions And Mythteries
Transact SQL Performance Tips
මොඩියුල විශ්ලේෂණය SQL Server Waits. Tables රැසක් එකට එකතු කිරීම.
Moving from SQL Profiler to xEvents
It’s TEMPDB Why Should You Care?
Tips & Tricks Knowing the Web Client.
Hidden Gems of SQL Server 2014
Summit Nashville /3/2019 1:48 AM
Score a (row) goal and beat a query optimizer
Deadlocks Everything you ever wanted to ask but were too shy
Hidden Gems of SQL Server 2014
Query Profiling Options in SQL Server
Hidden Gems of SQL Server 2014
SQL Server Query Design and Optimization Recommendations
What is New in SQL Server 2016 BI Stack
Summit Nashville /26/2019 4:32 AM
Denis Reznik SQL Server 2017 Hidden Gems.
Michelle Haarhues Keeping up with SSMS.
Reading execution plans successfully
Why should I care about SQL, if I have ORM?
Developing Microsoft SQL Server Databases
Denis Reznik SQL Server 2017 Hidden Gems.
Presentation transcript:

Hidden Gems of SQL Server 2016 Denis Reznik Hidden Gems of SQL Server 2016

Thank you to our AWESOME sponsors!

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”

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

Statistics Auto-Update

? Statistics SELECT * FROM Users WHERE Id BETWEEN 2100 AND 2500 800 2000 2800 4500 5400

Statistics Auto-Update DEMO Statistics Auto-Update

Statistics Update SQL Server 2014 and lower default behavior: 20% of rows + 500 SQL Server 2016 Dynamic threshold for tables with 25000+ rows TF 2371 for lower versions

Input Buffers

Input Buffers session_id = 65 SELECT * FROM Users WHERE Id = 123 EXEC ReportCheckSecurityRequest @UserId = 1 session_id = 65 SELECT * FROM Users WHERE Id = 123 session_id = 65 Session 65 INPUT BUFFER: EXEC ReportCheckSecurityRequest @UserId = 1 SELECT * FROM Users WHERE Id = 123

DEMO Input Buffers

Lightweight Profiling

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 https://blogs.msdn.microsoft.com/sql_server_team/query-progress-anytime-anywhere/ Session Level Server Level

Lightweight Profiling DEMO Lightweight Profiling

Session Waits

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

DEMO Session Waits

Functions Stats

Scalar Functions

DEMO Functions Stats

Query Hints

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

DEMO Query Hints

SUMMARY Statistics Auto-Update Input Buffers Lightweight Profiling Session Waits Functions Stats Query Hints

Thank You! Denis Reznik Twitter: @denisreznik Email: denisreznik@gmail.com Blog: http://reznik.uneta.com.ua Facebook: https://www.facebook.com/denis.reznik.5 LinkedIn: http://ua.linkedin.com/pub/denis-reznik/3/502/234