Presentation is loading. Please wait.

Presentation is loading. Please wait.

Session Name Pelin ATICI SQL Premier Field Engineer.

Similar presentations


Presentation on theme: "Session Name Pelin ATICI SQL Premier Field Engineer."— Presentation transcript:

1 Session Name Pelin ATICI SQL Premier Field Engineer

2 #sqlsatistanbul Media Sponsor Main Sponsor Swag Sponsor Sponsors

3 #sqlsatistanbul  Just a quick blog post, update on LinkedIn, or a tweet on Twitter is all we need. What do we need ?

4 #sqlsatistanbul Session Evaluations  Evaluate sessions and get a chance for the raffle: http://spoke.at/sqlsat451http://spoke.at/sqlsat451

5 #sqlsatistanbul Meet the Trainer Pelin ATICI  Premier Field Engineer  Customer Service & Support – Istanbul (EMEA), Microsoft Services  ~2 yrs. @ Microsoft  BS at Computer Engineering, Middle East Technical University  MS at Computer Engineering, Koç University

6 #sqlsatistanbul Agenda  Performance Enhancements −In-Memory OLTP  Performance New Features −Live Query Statistics −Query Store

7 #sqlsatistanbul Session Objectives and Takeaways  Introduce new features and improvements about performance with the release of SQL Server 2016 ! There are many other new features and enhancements (temporal tables, stretch database, always encrypted, row level security, dynamic data masking, AlwaysOn, CCI, tempDB) but this session only focuses on performance.

8 #sqlsatistanbul In-Memory OLTP Enhancements  To generate In-Memory OLTP reports (Transaction Performance Analysis Overview), there is no need to configure Management Data Warehouse and data collectors anymore.

9 #sqlsatistanbul In-Memory OLTP Enhancements  ALTER TABLE support for schema and index changes  ALTER PROCEDURE and sp_recompile support  Maximum memory for memory-optimized tables (2 TB)  Collation (now non-BIN2 collations are supported for tables and native compiled store procedures)  Parallel plans (certain operations can create parallel plans unlike SQL Server 2014)  Transparent Data Encryption (memory-optimized tables data on disk will be encrypted)

10 #sqlsatistanbul In-Memory OLTP Enhancements  Native compilation −LEFT and RIGHT OUTER JOIN −SELECT DISTINCT −OR and NOT operators −Subqueries in all clauses of a SELECT statement −Nested stored procedure calls −UNION and UNION ALL −All built-in math functions  Internal processing mechanisms −Dependency on Windows Filestream −Garbage Collection in Memory

11 #sqlsatistanbul Live Query Statistics  View live execution plan of a query, troubleshoot and debug

12 #sqlsatistanbul Live Query Statistics  How to enable it −Execute SET STATISTICS XML ON; or SET STATISTICS PROFILE ON; in the target session. −Enable the query_post_execution_showplan extended event. This is a server wide setting that enable live query statistics on all sessions.  Limitations −Natively compiled stored procedures are not supported.

13 #sqlsatistanbul Query Store Query Performance Problems  Find the “slow” query, is it really slow?  Why it is slow? (plan change, blocking, other system resources?)  How we can make it “less slow”?  Even if we know what to do, is it that easy? (Hints, plan guides?)

14 #sqlsatistanbul Query Store Reasons of Plan Changes  SQL’s Query Optimizer has a search space of query plans  Plan choice can be different based on the selectivity of the predicate and data changes  Near boundary values the cost and performance of plans should be similar  Sometimes actual performance is different

15 #sqlsatistanbul Query Store Idea behind Query Store: 1.Store the history of query plans in the system 2.Capture the performance of each query plan over time 3.Identify queries that have “gotten slower recently” 4.Allow you to force plans easily 5.Make sure this works across server restarts, upgrades, and query recompiles

16 #sqlsatistanbul Query Store What Gets Captured with Query Store? 1.Queries 2.Query plans 3.Runtime statistics (per unit of time, default 60 minutes) −Count of executions of each captured query plan −Data is recorded when query execution ends 4.Other workload history  Performance troubleshooting  Identifying regressed workloads  Identifying issues with upgrades

17 #sqlsatistanbul Query Store Demo

18 #sqlsatistanbul Query Store Write Architecture Compile Execute Plan Store Runtime Stats Query Store Query Store Schema Async Write-Back

19 #sqlsatistanbul Query Store Read Architecture In-Memory Data On-Disk Data TVF sys.query_store_runtime_stats

20 #sqlsatistanbul Query Store Catalog Views  sys.query_store_query_text (Transact-SQL)  sys.query_store_query (Transact-SQL)  sys.query_context_settings (Transact-SQL)  sys.query_store_plan (Transact-SQL)  sys.query_store_runtime_stats (Transact-SQL)  sys.query_store_runtime_stats_interval (Transact-SQL)  sys.database_query_store_options (Transact-SQL)

21 #sqlsatistanbul Query Store SQL Server 2016 Upgrade Path  Upgrade the instance; don’t change the DB compatibility level yet  Enable Query Store  Run workload to capture all query plans and get a baseline  Change DB compatibility level to new version (130)  Run the workload again  Use Query Store to find plan regressions and force optimal plans

22 #sqlsatistanbul Query Store Overhead and Schema Changes  Memory cost, small CPU cost and I/O cost  According to the workload and how much data you want to track, overhead will change  Average overhead should be between 2-5%  If the forced query plan can not be used (ex: drop an index which forced query plan uses), Query Store will use the non-forcing query plan instead of failing the query and breaking the application

23 #sqlsatistanbul Questions pelina@microsoft.com

24 #sqlsatistanbul Thank you


Download ppt "Session Name Pelin ATICI SQL Premier Field Engineer."

Similar presentations


Ads by Google