SQL Server 2016 Query Store



Similar documents
Improve query performance with the new SQL Server 2016 Query Store!!

Azure VM Performance Considerations Running SQL Server

Boost SQL Server Performance Buffer Pool Extensions & Delayed Durability

Course 55144: SQL Server 2014 Performance Tuning and Optimization

"Charting the Course... MOC AC SQL Server 2014 Performance Tuning and Optimization. Course Summary

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

$99.95 per user. SQL Server 2008/R2 Database Administration CourseId: 157 Skill level: Run Time: 47+ hours (272 videos)

SQL Server 2014 Performance Tuning and Optimization 55144; 5 Days; Instructor-led

UBGP008: Maximizing SQL Server Performance with Microsoft Dynamics GP. John Lowther

vrops Microsoft SQL Server MANAGEMENT PACK User Guide

Course 55144B: SQL Server 2014 Performance Tuning and Optimization

This presentation is an introduction to the SQL Server Profiler tool.

Shutting down / Rebooting Small Business Server 2003 Version 1.00

Performance Tuning and Optimizing SQL Databases 2016

Understanding SQL Server Execution Plans. Klaus Aschenbrenner Independent SQL Server Consultant SQLpassion.at

vcenter Operations Management Pack for SAP HANA Installation and Configuration Guide

Course Outline. SQL Server 2014 Performance Tuning and Optimization Course 55144: 5 days Instructor Led

IBM Tivoli Monitoring V6.2.3, how to debug issues with Windows performance objects issues - overview and tools.

Avamar Backup and Data De-duplication Exam

Exam : Upgrade: Transition Your MCITP SQL Server 2005 DBA to MCITP SQL Server Title : Version : Demo

IBM DB2: LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs

Who is my SAP HANA DBA? What can I expect from her/him? HANA DBA Role & Responsibility. Rajesh Gupta, Deloitte. Consulting September 24, 2015

SSMS Built in Reports for Server and Database Monitoring

SharePoint 2010 Performance and Capacity Planning Best Practices

W I S E. SQL Server 2012 Database Engine Technical Update WISE LTD.

Drupal Performance Tuning

SQL diagnostic manager Management Pack for Microsoft System Center. Overview

SQL Server AlwaysOn. Michal Tinthofer 11. Praha What to avoid and how to optimize, deploy and operate.

General DBA Best Practices

Managing and Monitoring Windows 7 Performance Lesson 8

Would-be system and database administrators. PREREQUISITES: At least 6 months experience with a Windows operating system.

ImageNow for Microsoft SQL Server

Bubble Code Review for Magento

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

XpoLog Center Suite Log Management & Analysis platform

Idera SQL Diagnostic Manager Management Pack Guide for System Center Operations Manager. Install Guide. Idera Inc., Published: April 2013

SQL Server Encryption Overview. September 2, 2015

SHAREPOINT 2013 IN INFRASTRUCTURE AS A SERVICE

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

SAP HANA PLATFORM Top Ten Questions for Choosing In-Memory Databases. Start Here

1. This lesson introduces the Performance Tuning course objectives and agenda

Monitoring and Diagnosing Oracle RAC Performance with Oracle Enterprise Manager. Kai Yu, Orlando Gallegos Dell Oracle Solutions Engineering

Imation LOCK User Manual

Server 2008 SQL. Administration in Action ROD COLLEDGE MANNING. Greenwich. (74 w. long.)

Beginning SQL Server Administration. Apress. Rob Walters Grant Fritchey

SQL Server. DMVs in Action. Better Queries with. Dynamic Management Views MANNING IANW. STIRK. Shelter Island

SQL Server 2014 New Features/In- Memory Store. Juergen Thomas Microsoft Corporation

DB2 for Linux, UNIX, and Windows Performance Tuning and Monitoring Workshop

Building Scalable Applications Using Microsoft Technologies

<Insert Picture Here> Oracle Database Directions Fred Louis Principal Sales Consultant Ohio Valley Region

Solving Performance Problems In SQL Server by Michal Tinthofer

Postgres Plus Advanced Server

SonicWALL CDP 5.0 Microsoft Exchange InfoStore Backup and Restore

Small Business Server Part 1

ILMT Central Team. Performance tuning. IBM License Metric Tool 9.0 Questions & Answers IBM Corporation

Monitoring and Diagnosing Oracle RAC Performance with Oracle Enterprise Manager

One of the database administrators

DBA 101: Best Practices All DBAs Should Follow

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

Management Pack for vrealize Infrastructure Navigator

How To Improve Performance In A Database

Quick Installation Guide

Upgrading Good Mobile Messaging and Good Mobile Control Servers

Exam Number/Code : Exam Name: Name: PRO:MS SQL Serv. 08,Design,Optimize, and Maintain DB Admin Solu. Version : Demo.

Bosch ReadykeyPRO Unlimited Installation Guide, product version 6.5. This guide is item number DOC , revision 2.029, May 2012.

SQL Best Practices for SharePoint admins, the reluctant DBA. ITP324 Todd Klindt

Oracle Database 12c: Performance Management and Tuning NEW

SQL SERVER FREE TOOLS

2. Empty the Recycle Bin. Some users need to be reminded to periodically empty the Recycle Bin.

Product Review: James F. Koopmann Pine Horse, Inc. Quest Software s Foglight Performance Analysis for Oracle

SharePoint What's New, What's Not. Colin Phillips :: SharePoint MVP & Consultant :: itgroove

IIS SECURE ACCESS FILTER 1.3

Query Performance Tuning: Start to Finish. Grant Fritchey

IMAPing 3.0 Administrator s Guide

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Raima Database Manager Version 14.0 In-memory Database Engine

Contact Center 5.1. Software Release Notes. GA Build

Managing the PowerPivot for SharePoint Environment

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

Optimizing Procedural Code

VI Performance Monitoring

Scaling out a SharePoint Farm and Configuring Network Load Balancing on the Web Servers. Steve Smith Combined Knowledge MVP SharePoint Server

Extreme Networks Security Upgrade Guide

IBM Security SiteProtector System Configuration Guide

Server & Workstation Installation of Client Profiles for Windows

SQL DBA Bundle. Data Sheet. Data Sheet. Introduction. What does it cost. What s included in the SQL DBA Bundle. Feedback for the SQL DBA Bundle

Dr.Backup Release Notes - Version

Enterprise Vault 11 Feature Briefing

Unexpected sync results

Oracle Database 12c: Performance Management and Tuning NEW

Syslog Configuration for Auditing

IPPBX FAQ. For Firmware Version: V2.0/V

Transcription:

SQL Server 2016 Query Store Sergio Govoni @segovoni www.sqlblog.com/blogs/sergio_govoni

Sponsors

Speaker BIO SQL Server MVP sqlblog.com/blogs/sergio_govoni @segovoni ugiss.org manning.com/delaney segovoni@gmail.com

Agenda Query plan change Can cause performance issues Why do plan changes happen? Problems you face for slow running queries What does the Query Store do for you? Live Query Statistics

QP changes can cause performance issues Web site is down Temporary perf. issues SQL Server upgrade Database is not working How to fix it ASAP? Impossible to predict the root cause Performance regression caused by the new version

Fixing query plan regression is hard Problems you face for slow running queries Time of the day and compiled parameters Has the Data Collector been activated? Plan cache may not be suitable for troubleshooting You have to find out why it is show When you have the issue on you hands Can you modify the query text? Do you know the SP to create the Plan Guide?

Let s do a quiz Who is the author of this painting? A. Pablo Picasso B. Vincent Van Gogh C. Claude Monet D. Pierre-Auguste Renoir E. Query Optimizer P 1 P 2 P 3 P 4

Why do plan changes happen? Query Optimizer generates and evaluates many plans for the same query Data changes every hour, so the QO might select a different plan Generally, boundary plans have the same performance http://dsl.serc.iisc.ernet.in/projects/picasso/

What does the Query Store do for you? It stores all the plan choices and related performance metrics for each query It identifies queries that have become slower recently It allows DBA to force an execution plan easily It makes sure your changes work across server restart, upgrades, failover and query recompiles

How the Query Store captures data

How the Query Store exposes data Each DMV joined In- Memory and On-Disk data When memory pressure occurs, some data In- Memory will be flushed to the disk In-Memory Data On-Disk Data sys.query_store_runtime_stats

How the Query Store interprets the query text Query text starts from the first character of the first token (of the statement) and it ends at the last character of the last token Comments and spaces, before or after, don t change anything Comments and spaces inside count sys.query_store_query_text query_text_id is used to force a plan for a query statement_sql_handle contains the MD5 hash of the query text

Query Store DMV overview ANSI Options Execution plans Metrics: 1 row per plan per time interval 1:N 1:N 1:N Query_Text Query_ANSI Query_Plan Runtime_Stats Context_Settings One row per unique combination of set options Runtime_Stats_Interval One row per time interval

Demo Environment A console application executes this query in a loop on a database where Query Store is enabled Parameters are generated by a randomized function, values are between Zero and 100 Plan cache is cleaned when parameters values are less than 2

SQL Server 2016 Query Store DEMO

Query Store Tuning Because collecting data has always a cost, SQL Server allows you to tune the Query Store with these options of ALTER DATABASE statement INTERVAL_LENGTH_MINUTES MAX_STORAGE_SIZE_MB MAX_PLANS_PER_QUERY (200 by default) QUERY_CAPTURE_MODE (ALL, AUTO, NONE) DATA_FLUSH_INTERVAL_SECONDS

Server Upgrades Are you worried about SQL Server upgrades? This is the way out 1. Restore a copy of the production DBs on a test server 2. Run a significative workload 3. Look at the Query Store for performance regressions Plan forced works across Recompilation Server reboots and failover

Live Query Statistics Allows you to see the live execution plan of an active query It provides a way to better understand the query execution process and the control flow It is extremely useful (and cool ) for debugging query performance It is based on sys.dm_exec_query_profiles You can use it also on SQL Server 2014 (SP1)

Live Query Statistics DEMO

Live Query Statistics on SQL 2014 (SP1) At the server side Download and install the Service Pack 1 for SQL 2014 (if you have not already done) At the client side Download and install the latest version of SSMS (September 2015 preview) Enable the Live Query Statistics Play with it on a test machine.. SQL Server will make some effort to produce the data for this tool!

Summary: With Query Store you can.. Analyze your workload Easily fix plan regressions Find the most expensive queries De-risk SQL Server upgrades

Resources [docs.com] SQL Server Query Store SQL Server 2016 Video Pills Live Query Statistics

Q&A Questions?

Evaluations Don t forget to compile evaluations form here http://speakerscore.com/sqlsat454 This session http://speakerscore.com/qs2016

#sqlsat454 http://speakerscore.com/qs2016 THANKS! Thanks for attending this session. If you have additional questions, please post them on the MSDN SQL Server Forums (ITA ENG)