SlideShare a Scribd company logo
Welcome To The 2016 Query Store!
Janis Griffin
Senior DBA / Performance Evangelist
2
• Senior DBA / Performance Evangelist for Solarwinds
• JanisGriffin@solarwinds.com
• Twitter® - @DoBoutAnything
• Current – 25+ Years in Oracle®, SQL Server®, ASE, and now MySQL®
• DBA and Developer
• Specialize in Performance Tuning
• Review Database Performance for Customers and Prospects
• Common Question – How do I tune it?
Who am I
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
3
• What is Query Store?
• In the Beginning: Tracing, DMVs & Extended Events
• Overview of Query Store
• Why use Query Store?
• Benefits & Gotchas
• How Query Store Works
• Enabling, configuring & managing it
• Best practice considerations – configuration & storage
• Performance Impact
• What’s New In 2017?
• Reporting & Several Use Cases
• Demos - using both scripts & SSMS
Agenda
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
4
• User complains query is slow
• DBA says nothing has changed
• No new releases
• No additional load
• What changed?
• Changes in data causing out-of-date statistics
• Changes in execution parameters
• Parameter sniffing and/or data skew
• System changes
• Troubleshooting plan changes difficult in previous versions
• Had to trace
• Had to know xQuery to decipher the plan cache XML
In the Beginning…
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
5
• <2005 had tracing
• High overhead
• Difficult to use (had to start & stop)
• 2005+ DMVs: dm_exec_cached_plans & query_stats
• Real time only or since last restart or clear
• Can’t see history of plan changes or regression overtime
• 2012+ Extended Events
• Easier to use than trace
• System Health session on by default
• No history of plan changes / regression
In the Beginning…
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
6
• New feature in 2016, Improved in 2017
• Provides insight on Query Plans
• Useful in troubleshooting performance degradation
• Quickly find differences when query plan changes
• Can see history of plans and runtime statistics
• Data is persisted in database
• Not just stored in memory
• Shows workload and database usage patterns
• Makes upgrades easier
• Between versions of SQL Server
• Put in compatibility mode 100 (lowest) or keep at prior level
• Turn on query store
• Collect representative workload
• Force plans where needed
What is Query Store?
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
7
• Simplifies performance tuning
• Can see plan changes & quickly compare their differences
• Can aggregate runtime statistics over different time intervals
• Can enable at database level
• You get to control when, where and how you use it
• Tracks both runtime and compile time metrics
• Has graphical interface in SSMS
• Supported on all SQL Server editions
Benefits Of Using Query Store
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
2016 2017
8
• Allows forcing or pinning of a better plan for a query
• Can be a quick temporary fix
• However, can be easily forgotten
• When data and/or schema changes
• Easy T-SQL for scripting
• Can quickly find queries:
• Which frequently fail
• Which use literals
• Which are resource intensive and/or most regressed over time
• Many SPs, QSD Wait types, & Extended Events
• For management purposes
Benefits – cont.
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
9
How Query Store Works
https://msdn.microsoft.com/en-us/library/mt631173.aspx© 2017 SolarWinds Worldwide, LLC. All rights reserved.
10
How Query Store Works – cont.
https://msdn.microsoft.com/en-us/library/mt631173.aspx
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
11
• Query Store is local for each database
• Is disabled by default
• To enable in SSMS
Enabling the Query Store
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
12
• SSMS
• T-SQL
Changing Query Store Settings
ALTER DATABASE AdventureWorks
SET QUERY_STORE = ON
( OPERATION_MODE = READ_WRITE,
CLEANUP_POLICY = ( STALE_QUERY_THRESHOLD_DAYS = 30 ),
DATA_FLUSH_INTERVAL_SECONDS = 900,
MAX_STORAGE_SIZE_MB = 100,
INTERVAL_LENGTH_MINUTES = 10);
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
13
• https://msdn.microsoft.com/en-us/library/dn818146.aspx
View Query Store Settings
select * from sys.database_query_store_options;
Must watch size!
If full or state
changes, errors
aren’t written to log.
Monitor actual_state.
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
14
• Operation Mode (Requested) / operation_mode
• Default value: Off
• Valid values are Off, Read Write, Read Only
• T-SQL: off, read_write, read_only
• Actual operation mode can change to “read only” with full
• Consider monitoring – change not written to logs
• Data Flush Interval (Minutes)
• When data is written from memory to disk
• Default is 15 minutes
• T-SQL: DATA_FLUSH_INTERVAL_SECONDS
• 900 secs = 15 min
Query Store Settings
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
15
• Statistics Collection Interval
• Defaults to 1 hour
• Consider changing to 10 minutes to get granular aggregation
• Higher frequency will require more storage
• Lowest level – 1 minute
• T-SQL: INTERVAL_LENGTH_MINUTES
• Max Size (MB)
• Maximum size allocated to the Query Store
• Defaults to 100 MB
• Stored in primary file of database
• When full, changes to read-only
• T-SQL: MAX_STORGE_SIZE_MB
Query Store Settings – cont.
ALTER DATABASE AdventureWorks
SET QUERY_STORE CLEAR;
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
16
• Query Store Capture Mode
• ‘All’ collects all plans (default)
• ‘Auto’ captures queries based on resource consumption
• ‘None’ stops the capture process
• T-SQL: QUERY_CAPTURE_MODE
• Size Based Cleanup Mode
• Activates data cleanup when it reaches maximum size
• 2016 - defaults to ‘Off’, 2017 – defaults to ‘Auto’
• Consider changing to ‘Auto’
• Flushes older queries and trivial plans as new data comes in
• Will not change to ‘read only’
• T-SQL: SIZE_BASED_CLEANUP_MODE
Query Store Settings – cont.
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
17
• Stale Query Threshold (Days)
• Duration to retain query store statistics
• Default 30 days
• T-SQL: CLEANUP_POLICY (STALE_QUERY_THRESHOLD_DAYS)
• MAX_PLANS_PER_QUERY
• Default is 200 plans
• Have you ever seen 200 plans to 1 query?
• Consider changing to something less
• Must change via T-SQL not in SSMS
Query Store Settings– cont.
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
18
• Consider enabling in the MODEL database
• In SSMS - no Query Store property in MODEL db
• Need to turn on via T-SQL
• ALTER DATABASE MODEL SET QUERY_STORE=ON;
• Consider proper sizing of Query Store
• Default is 100mb
• May be too small for busy database
• By default, it converts to read-only when full
select max_storage_size_mb - current_storage_size_mb qs_free_space_mb
from sys.database_query_store_options;
Query Store Considerations
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
19
• Disabled by default
• Need to enable at each individual database level
• Can modify Model so it’s on by default
• Consider sizing / performance implications
• Can’t enable for master or tempdb
• Can’t enable for Read-Only databases
• E.g. AG replication for read-only
• No global way to control configuration
• Without manual scripting or setting up Model DB
• DBAs can easily change in SSMS so hard to track
• Changes to QS settings are logged in ERRORLOG
Gotchas Of Using Query Store
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
20
• Query Store (QS) requires care & feeding
• Default sizes may be too small for a busy database
• If QS storage is full, switches to READ-Only mode
• May miss important performance info
• Query Store data is stored in primary file
• May conflict or compete for resource with user data
• Can add 3-5% load to the database load
• May take longer database restores
• Plans may contain literal values (HIPAA)
• No additional context – Who ran it, etc…
Gotchas – cont.
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
21
• Don’t blindly turn it on / plan, plan, plan
• Consider what you will use it for
• Which databases are enabled / what’s the retention period
• How will you manage it?
• Must monitor QS status, performance & storage
• Create standard setup & configuration scripts
• Consider backups / restores
• Restore into development / test or NOT
• Replication – sensitive data, forced plans, etc…
Query Store Management
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
22
• Microsoft states 3% to 5% impact on average
• Depends on
• # of databases monitored
• Transaction / Compile rates
• Query Store Configurations
• Can monitor Query Store via
• Perfmon Counters
• QDS Wait Types
• Extended Events
Query Store Performance Impact
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
23
Query Store Performance Impact
QS Events
2016 – 58
2017 – 90+
Not very well
documented
- 17 in 2016
- 20 in 2017
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
24
• sp_query_store_flush_db;
• Flushes in-memory portion of data to disk
• sp_query_store_reset_exec_stats plan_id;
• Clears runtime stats for a specific query plan
• sp_query_store_force_plan query_id, plan_id;
• Enables forcing a particular plan, if forcing fails a Xevent is fired to optimize normally
• sp_query_store_unforce_plan query_id, plan_id;
• Removes forcing a particular plan for a particular query
• sp_query_store_remove_plan plan_id;
• Removes a single plan from the Query Store
• sp_query_store_remove_query query_id;
• Removes a single query, all associated plans and statistics from Query Store
Management – Stored Procedures
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
…
…
…
…
…
25
• query_store_query_text - text entered by user, includes whites space, hints, etc... msdn-dn818159.aspx
• query_context_settings - unique combinations of plan affecting settings under which queries run msdn-dn818148.aspx
• query_store_plan - execution plan information for queries msdn-dn818155.aspx
• query_store_query - query information and overall aggregated runtime statistics msdn-dn818156.aspx
• query_store_runtime_stats - runtime execution statistics for queries (avg,min,max,std deviation) msdn-dn818158.aspx
• query_store_runtime_stats_interval - start and end times intervals for statistics collected msdn-dn818147.aspx2
Query Store DMVs
26
• SSMS Reports
• Force Plans
• View Forced Plans
• Compare Plans
• Find queries with high variation
• See overall resource consumption
• T-SQL
• Useful Queries
• Find Multiple Plans
• Find Long Running Queries
• Find Queries Doubling in time
• Find AD-Hoc Queries
• Using literals
• Plan Guides versus Forced Plans
Query Store Reporting & Use Cases
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
• New Wait Stats Store
• Plus plan store
• And runtime stats store
• On = 1 (default)
• T-SQL: WAIT_STATS_CAPTURE_MODE
• OFF = 0
• New 23 Wait Categories
• Summarizes wait types
• Common resolution
• Using-the-query-store
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
What’s New In 2017 Query Store?
Join to query_store_plan and
query_store_runtime_stats_interval
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
2017 Query Store – Cont.
• Find Top 10 Queries Waiting The Most
Over 1 hour waiting on Parallelism
SELECT TOP 10
qt.query_sql_text,
q.query_id,
p.plan_id,
ws.wait_category_desc,
sum(total_query_wait_time_ms) AS sum_total_wait_ms
FROM sys.query_store_wait_stats ws
JOIN sys.query_store_plan p ON ws.plan_id = p.plan_id
JOIN sys.query_store_query q ON p.query_id = q.query_id
JOIN sys.query_store_query_text qt ON q.query_text_id = qt.query_text_id
WHERE ws.wait_category_desc != 'Idle'
GROUP BY qt.query_sql_text, q.query_id, p.plan_id, ws.wait_category_desc
ORDER BY sum_total_wait_ms DESC
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
2017 Query Store – Cont.
• Query Store and the New Adaptive Query Processing
• Captures and can force batch mode adaptive join plan
• Can force plans with interleaved execution (MSTVFs)
• Command-line Tools
• sqlcmd & bcp
• SSMS
• Connect remotely from Windows
• Includes PowerShell
• Visual Studio Code
• How-to-develop-use-vscode
• SQL Server Data Tools (SSDT)
• For Visual Studio
• Build project on Windows
• Deploy to Linux
• SQL Operations Studio
• Installs on Linux/Windows/MacOS
• GUI interface – sqlops
https://docs.microsoft.com/en-us/sql/sql-operations-studio/download
Client Connectivity & Tools for 2017
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
31
• Review Properties
• Database defaults
• Turn on QS in Model
• Database with QS on
• Show full QS
• Look at T-SQL Code
• Multiplan Queries
• Long running – doubled in duration (microseconds)
• Parameter Canidates
• Review SSMS Reports
• Force a Plan
• Show Forced Plan Failures
• Extended Events
• Q & A
Demo Time
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
32
SSMS - Regressed Queries Report
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
33
Overall Resource Consumption
34
Top Resource Consuming Queries
Canceled
Failed
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
35
Tracked Queries
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
36
Compare Query Plans
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
37
Forcing Plans
SELECT p.plan_id, p.query_id, q.object_id as containing_object_id, force_failure_count, last_force_failure_reason_desc
FROM sys.query_store_plan p
JOIN sys.query_store_query q on p.query_id = q.query_id
WHERE is_forced_plan = 1;
To remove force plan via TSQL:
sp_query_store_unforce_plan 615,665;
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
38
Failed Forced Plans
Reasons why plan forcing failed
0: no failure
8637: ONLINE_INDEX_BUILD
8683: INVALID_STARJOIN
8684: TIME_OUT
8689: NO_DB
8690: HINT_CONFLICT
8691: SETOPT_CONFLICT
8694: DQ_NO_FORCING_SUPPORTED
8698: NO_PLAN
8712: NO_INDEX
8713: VIEW_COMPILE_FAILED
<other value>: GENERAL_FAILURE
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
39
• https://msdn.microsoft.com/en-us/library/dn817826.aspx
;WITH Query_MultPlans
AS
(
SELECT COUNT(*) AS cnt, q.query_id
FROM sys.query_store_query_text AS qt
JOIN sys.query_store_query AS q
ON qt.query_text_id = q.query_text_id
JOIN sys.query_store_plan AS p
ON p.query_id = q.query_id
GROUP BY q.query_id
HAVING COUNT(distinct plan_id) > 1
)
Useful Query Store Queries
SELECT q.query_id, object_name(object_id) AS ContainingObject,
query_sql_text, plan_id, convert(xml,p.query_plan) AS plan_xml,
p.last_compile_start_time, p.last_execution_time
FROM Query_MultPlans AS qm
JOIN sys.query_store_query AS q
ON qm.query_id = q.query_id
JOIN sys.query_store_plan AS p
ON q.query_id = p.query_id
JOIN sys.query_store_query_text qt
ON qt.query_text_id = q.query_text_id
ORDER BY query_id, plan_id;
GO
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
40
Multi-plan Queries
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
41
;WITH AggregatedDurationLastHour
AS
(
SELECT q.query_id, SUM(count_executions * avg_duration) AS total_duration,
COUNT (distinct p.plan_id) AS number_of_plans
FROM sys.query_store_query_text AS qt JOIN sys.query_store_query AS q
ON qt.query_text_id = q.query_text_id
JOIN sys.query_store_plan AS p ON q.query_id = p.query_id
JOIN sys.query_store_runtime_stats AS rs ON rs.plan_id = p.plan_id
JOIN sys.query_store_runtime_stats_interval AS rsi
ON rsi.runtime_stats_interval_id = rs.runtime_stats_interval_id
WHERE rsi.start_time >= DATEADD(hour, -1, GETUTCDATE())
AND rs.execution_type_desc = 'Regular'
GROUP BY q.query_id
) ,OrderedDuration
AS
(
SELECT query_id, total_duration, number_of_plans,
ROW_NUMBER () OVER (ORDER BY total_duration DESC, query_id) AS RN
FROM AggregatedDurationLastHour
)
Long Running – Last Hour
SELECT qt.query_sql_text, object_name(q.object_id) AS
containing_object, q.query_id,
p.plan_id,rsi.start_time as interval_start, rs.avg_duration,
CONVERT(xml, p.query_plan) AS query_plan_xml
FROM OrderedDuration od JOIN sys.query_store_query
AS q ON q.query_id = od.query_id
JOIN sys.query_store_query_text AS qt ON
q.query_text_id = qt.query_text_id
JOIN sys.query_store_plan AS p ON q.query_id =
p.query_id
JOIN sys.query_store_runtime_stats AS rs ON rs.plan_id
= p.plan_id
JOIN sys.query_store_runtime_stats_interval AS rsi ON
rsi.runtime_stats_interval_id = rs.runtime_stats_interval_id
WHERE rsi.start_time >= DATEADD(hour, -1,
GETUTCDATE())
AND number_of_plans > 1
ORDER BY total_duration DESC, query_id,
rsi.runtime_stats_interval_id, p.plan_id
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
42
Long Running – Last Hour
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
© 2017 SolarWinds Worldwide, LLC. All rights reserved. 43
SELECT
qt.query_sql_text,
q.query_id,
qt.query_text_id,
rs1.runtime_stats_id AS runtime_stats_id_1,
rsi1.start_time AS interval_1,
p1.plan_id AS plan_1,
rs1.avg_duration AS avg_duration_1,
rs2.avg_duration AS avg_duration_2,
p2.plan_id AS plan_2,
rsi2.start_time AS interval_2,
rs2.runtime_stats_id AS runtime_stats_id_2
FROM sys.query_store_query_text AS qt
JOIN sys.query_store_query AS q
ON qt.query_text_id = q.query_text_id
JOIN sys.query_store_plan AS p1
ON q.query_id = p1.query_id
JOIN sys.query_store_runtime_stats AS rs1
ON p1.plan_id = rs1.plan_id
Execution Time - Doubled in Last 48hrs
JOIN sys.query_store_runtime_stats_interval AS rsi1
ON rsi1.runtime_stats_interval_id = rs1.runtime_stats_interval_id
JOIN sys.query_store_plan AS p2
ON q.query_id = p2.query_id
JOIN sys.query_store_runtime_stats AS rs2
ON p2.plan_id = rs2.plan_id
JOIN sys.query_store_runtime_stats_interval AS rsi2
ON rsi2.runtime_stats_interval_id = rs2.runtime_stats_interval_id
WHERE rsi1.start_time > DATEADD(hour, -48, GETUTCDATE())
AND rsi2.start_time > rsi1.start_time
AND p1.plan_id <> p2.plan_id
AND rs2.avg_duration > 2*rs1.avg_duration
ORDER BY q.query_id, rsi1.start_time, rsi2.start_time;
44
Execution Time - Doubled in Last 48hrs
Plan_1 = 370ms Plan_2 = 3.7s
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
45
• Query Store helps you manage query performance
• See plan changes & performance regression
• Find bad parameter sniffing & stale statistics
• See resource consumption at query & database level
• Info is only kept in database where query runs
• If you run them out of master or tempdb, they won’t be kept
• Need to plan & maintain the Query Store
• Size appropriately for workload
• Consider how long to keep the data
• Consider backups & restores
Summary
© 2017 SolarWinds Worldwide, LLC. All rights reserved.
The SolarWinds, SolarWinds & Design, Orion, and THWACK trademarks are the exclusive
property of SolarWinds Worldwide, LLC or its affiliates, are registered with the U.S.
Patent and Trademark Office, and may be registered or pending registration in other
countries. All other SolarWinds trademarks, service marks, and logos may be common
law marks or are registered or pending registration. All other trademarks mentioned
herein are used for identification purposes only and are trademarks of (and may be
registered trademarks) of their respective companies.
Thank You!

More Related Content

What's hot

The Marriage of the Data Lake and the Data Warehouse and Why You Need Both
The Marriage of the Data Lake and the Data Warehouse and Why You Need BothThe Marriage of the Data Lake and the Data Warehouse and Why You Need Both
The Marriage of the Data Lake and the Data Warehouse and Why You Need Both
Adaryl "Bob" Wakefield, MBA
 
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Cathrine Wilhelmsen
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
Jugal Shah
 
Data Quality Patterns in the Cloud with Azure Data Factory
Data Quality Patterns in the Cloud with Azure Data FactoryData Quality Patterns in the Cloud with Azure Data Factory
Data Quality Patterns in the Cloud with Azure Data Factory
Mark Kromer
 
Differentiate Big Data vs Data Warehouse use cases for a cloud solution
Differentiate Big Data vs Data Warehouse use cases for a cloud solutionDifferentiate Big Data vs Data Warehouse use cases for a cloud solution
Differentiate Big Data vs Data Warehouse use cases for a cloud solution
James Serra
 
Delta Lake with Azure Databricks
Delta Lake with Azure DatabricksDelta Lake with Azure Databricks
Delta Lake with Azure Databricks
Dustin Vannoy
 
Building a modern data warehouse
Building a modern data warehouseBuilding a modern data warehouse
Building a modern data warehouse
James Serra
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
aksrauf
 
Data warehousing and online analytical processing
Data warehousing and online analytical processingData warehousing and online analytical processing
Data warehousing and online analytical processing
VijayasankariS
 
Optimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptxOptimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptx
IDERA Software
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
VishalJharwade
 
Intro to MySQL Master Slave Replication
Intro to MySQL Master Slave ReplicationIntro to MySQL Master Slave Replication
Intro to MySQL Master Slave Replication
satejsahu
 
The delta architecture
The delta architectureThe delta architecture
The delta architecture
Prakash Chockalingam
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data Warehouse
SOMASUNDARAM T
 
Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...
Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...
Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...
Denodo
 
Snowflake free trial_lab_guide
Snowflake free trial_lab_guideSnowflake free trial_lab_guide
Snowflake free trial_lab_guide
slidedown1
 
Guru4Pro Data Vault Best Practices
Guru4Pro Data Vault Best PracticesGuru4Pro Data Vault Best Practices
Guru4Pro Data Vault Best Practices
CGI
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene Polonichko
Dimko Zhluktenko
 
Data Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesData Warehouse Design and Best Practices
Data Warehouse Design and Best Practices
Ivo Andreev
 

What's hot (20)

The Marriage of the Data Lake and the Data Warehouse and Why You Need Both
The Marriage of the Data Lake and the Data Warehouse and Why You Need BothThe Marriage of the Data Lake and the Data Warehouse and Why You Need Both
The Marriage of the Data Lake and the Data Warehouse and Why You Need Both
 
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
 
Data Quality Patterns in the Cloud with Azure Data Factory
Data Quality Patterns in the Cloud with Azure Data FactoryData Quality Patterns in the Cloud with Azure Data Factory
Data Quality Patterns in the Cloud with Azure Data Factory
 
Differentiate Big Data vs Data Warehouse use cases for a cloud solution
Differentiate Big Data vs Data Warehouse use cases for a cloud solutionDifferentiate Big Data vs Data Warehouse use cases for a cloud solution
Differentiate Big Data vs Data Warehouse use cases for a cloud solution
 
Delta Lake with Azure Databricks
Delta Lake with Azure DatabricksDelta Lake with Azure Databricks
Delta Lake with Azure Databricks
 
Building a modern data warehouse
Building a modern data warehouseBuilding a modern data warehouse
Building a modern data warehouse
 
Dimensional Modeling
Dimensional ModelingDimensional Modeling
Dimensional Modeling
 
Data warehousing and online analytical processing
Data warehousing and online analytical processingData warehousing and online analytical processing
Data warehousing and online analytical processing
 
Optimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptxOptimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptx
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
Intro to MySQL Master Slave Replication
Intro to MySQL Master Slave ReplicationIntro to MySQL Master Slave Replication
Intro to MySQL Master Slave Replication
 
The delta architecture
The delta architectureThe delta architecture
The delta architecture
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data Warehouse
 
Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...
Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...
Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...
 
Snowflake free trial_lab_guide
Snowflake free trial_lab_guideSnowflake free trial_lab_guide
Snowflake free trial_lab_guide
 
Guru4Pro Data Vault Best Practices
Guru4Pro Data Vault Best PracticesGuru4Pro Data Vault Best Practices
Guru4Pro Data Vault Best Practices
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene Polonichko
 
Data Warehouse Design and Best Practices
Data Warehouse Design and Best PracticesData Warehouse Design and Best Practices
Data Warehouse Design and Best Practices
 

Similar to Welcome To The 2016 Query Store!

Geek Sync | Intro to Query Store
Geek Sync | Intro to Query StoreGeek Sync | Intro to Query Store
Geek Sync | Intro to Query Store
IDERA Software
 
IDERA Live | Leverage the Query Store for Better SQL Server Performance
IDERA Live | Leverage the Query Store for Better SQL Server PerformanceIDERA Live | Leverage the Query Store for Better SQL Server Performance
IDERA Live | Leverage the Query Store for Better SQL Server Performance
IDERA Software
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
Sanjay Manwani
 
SQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To KnowSQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To Know
Quest
 
Which Change Data Capture Strategy is Right for You?
Which Change Data Capture Strategy is Right for You?Which Change Data Capture Strategy is Right for You?
Which Change Data Capture Strategy is Right for You?
Precisely
 
Monitorando performance no Azure SQL Database
Monitorando performance no Azure SQL DatabaseMonitorando performance no Azure SQL Database
Monitorando performance no Azure SQL Database
Vitor Fava
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
Ryusuke Kajiyama
 
Using Query Store to Understand and Control Query Performance
Using Query Store to Understand and Control Query PerformanceUsing Query Store to Understand and Control Query Performance
Using Query Store to Understand and Control Query Performance
Grant Fritchey
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
Mark Swarbrick
 
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
J.D. Wade
 
The Future of Data Warehousing: ETL Will Never be the Same
The Future of Data Warehousing: ETL Will Never be the SameThe Future of Data Warehousing: ETL Will Never be the Same
The Future of Data Warehousing: ETL Will Never be the Same
Cloudera, Inc.
 
high performance databases
high performance databaseshigh performance databases
high performance databases
mahdi_92
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
SolarWinds
 
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query TuningSQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
Javier Villegas
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
EDB
 
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech TalksDeep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Amazon Web Services
 
What SQL DBAs need to know about SharePoint-Indianapolis 2013
What SQL DBAs need to know about SharePoint-Indianapolis 2013What SQL DBAs need to know about SharePoint-Indianapolis 2013
What SQL DBAs need to know about SharePoint-Indianapolis 2013
J.D. Wade
 
Open Source Databases on the Cloud - Peter Dachnowicz
Open Source Databases on the Cloud - Peter DachnowiczOpen Source Databases on the Cloud - Peter Dachnowicz
Open Source Databases on the Cloud - Peter Dachnowicz
Amazon Web Services
 
Datavail Health Check
Datavail Health CheckDatavail Health Check
Datavail Health Check
Datavail
 
Presentation cloud control enterprise manager 12c
Presentation   cloud control enterprise manager 12cPresentation   cloud control enterprise manager 12c
Presentation cloud control enterprise manager 12c
xKinAnx
 

Similar to Welcome To The 2016 Query Store! (20)

Geek Sync | Intro to Query Store
Geek Sync | Intro to Query StoreGeek Sync | Intro to Query Store
Geek Sync | Intro to Query Store
 
IDERA Live | Leverage the Query Store for Better SQL Server Performance
IDERA Live | Leverage the Query Store for Better SQL Server PerformanceIDERA Live | Leverage the Query Store for Better SQL Server Performance
IDERA Live | Leverage the Query Store for Better SQL Server Performance
 
MySQL :What's New #GIDS16
MySQL :What's New #GIDS16MySQL :What's New #GIDS16
MySQL :What's New #GIDS16
 
SQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To KnowSQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To Know
 
Which Change Data Capture Strategy is Right for You?
Which Change Data Capture Strategy is Right for You?Which Change Data Capture Strategy is Right for You?
Which Change Data Capture Strategy is Right for You?
 
Monitorando performance no Azure SQL Database
Monitorando performance no Azure SQL DatabaseMonitorando performance no Azure SQL Database
Monitorando performance no Azure SQL Database
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
Using Query Store to Understand and Control Query Performance
Using Query Store to Understand and Control Query PerformanceUsing Query Store to Understand and Control Query Performance
Using Query Store to Understand and Control Query Performance
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
 
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
 
The Future of Data Warehousing: ETL Will Never be the Same
The Future of Data Warehousing: ETL Will Never be the SameThe Future of Data Warehousing: ETL Will Never be the Same
The Future of Data Warehousing: ETL Will Never be the Same
 
high performance databases
high performance databaseshigh performance databases
high performance databases
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
 
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query TuningSQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
SQL Server 2017 - Adaptive Query Processing and Automatic Query Tuning
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
 
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech TalksDeep Dive on MySQL Databases on AWS - AWS Online Tech Talks
Deep Dive on MySQL Databases on AWS - AWS Online Tech Talks
 
What SQL DBAs need to know about SharePoint-Indianapolis 2013
What SQL DBAs need to know about SharePoint-Indianapolis 2013What SQL DBAs need to know about SharePoint-Indianapolis 2013
What SQL DBAs need to know about SharePoint-Indianapolis 2013
 
Open Source Databases on the Cloud - Peter Dachnowicz
Open Source Databases on the Cloud - Peter DachnowiczOpen Source Databases on the Cloud - Peter Dachnowicz
Open Source Databases on the Cloud - Peter Dachnowicz
 
Datavail Health Check
Datavail Health CheckDatavail Health Check
Datavail Health Check
 
Presentation cloud control enterprise manager 12c
Presentation   cloud control enterprise manager 12cPresentation   cloud control enterprise manager 12c
Presentation cloud control enterprise manager 12c
 

More from SolarWinds

SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...
SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...
SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...
SolarWinds
 
SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...
SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...
SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...
SolarWinds
 
Government Webinar: Alerting and Reporting in the Age of Observability
Government Webinar: Alerting and Reporting in the Age of ObservabilityGovernment Webinar: Alerting and Reporting in the Age of Observability
Government Webinar: Alerting and Reporting in the Age of Observability
SolarWinds
 
Government and Education Webinar: Full Stack Observability
Government and Education Webinar: Full Stack ObservabilityGovernment and Education Webinar: Full Stack Observability
Government and Education Webinar: Full Stack Observability
SolarWinds
 
Government and Education Webinar: Public Sector Cybersecurity Survey - What I...
Government and Education Webinar: Public Sector Cybersecurity Survey - What I...Government and Education Webinar: Public Sector Cybersecurity Survey - What I...
Government and Education Webinar: Public Sector Cybersecurity Survey - What I...
SolarWinds
 
Becoming Secure By Design: Questions You Should Ask Your Software Vendors
Becoming Secure By Design: Questions You Should Ask Your Software VendorsBecoming Secure By Design: Questions You Should Ask Your Software Vendors
Becoming Secure By Design: Questions You Should Ask Your Software Vendors
SolarWinds
 
Government and Education Webinar: Real-Time Mission, CIO, and Command Dashboards
Government and Education Webinar: Real-Time Mission, CIO, and Command DashboardsGovernment and Education Webinar: Real-Time Mission, CIO, and Command Dashboards
Government and Education Webinar: Real-Time Mission, CIO, and Command Dashboards
SolarWinds
 
Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: Simplify Your Database Performance Manageme...Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: Simplify Your Database Performance Manageme...
SolarWinds
 
Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...
Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...
Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...
SolarWinds
 
Government and Education Webinar: Leverage Automation to Improve IT Operations
Government and Education Webinar: Leverage Automation to Improve IT OperationsGovernment and Education Webinar: Leverage Automation to Improve IT Operations
Government and Education Webinar: Leverage Automation to Improve IT Operations
SolarWinds
 
Government and Education Webinar: Improving Application Performance
Government and Education Webinar: Improving Application PerformanceGovernment and Education Webinar: Improving Application Performance
Government and Education Webinar: Improving Application Performance
SolarWinds
 
Government and Education: IT Tools to Support Your Hybrid Workforce
Government and Education: IT Tools to Support Your Hybrid WorkforceGovernment and Education: IT Tools to Support Your Hybrid Workforce
Government and Education: IT Tools to Support Your Hybrid Workforce
SolarWinds
 
Government and Education Webinar: There's More Than One Way to Monitor SQL Da...
Government and Education Webinar: There's More Than One Way to Monitor SQL Da...Government and Education Webinar: There's More Than One Way to Monitor SQL Da...
Government and Education Webinar: There's More Than One Way to Monitor SQL Da...
SolarWinds
 
SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...
SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...
SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...
SolarWinds
 
Government and Education Webinar: Zero-Trust Panel Discussion
Government and Education Webinar: Zero-Trust Panel Discussion Government and Education Webinar: Zero-Trust Panel Discussion
Government and Education Webinar: Zero-Trust Panel Discussion
SolarWinds
 
Government and Education: Leveraging The SolarWinds Orion Assistance Program ...
Government and Education: Leveraging The SolarWinds Orion Assistance Program ...Government and Education: Leveraging The SolarWinds Orion Assistance Program ...
Government and Education: Leveraging The SolarWinds Orion Assistance Program ...
SolarWinds
 
Government and Education Webinar: SQL Server—Advanced Performance Tuning
Government and Education Webinar: SQL Server—Advanced Performance Tuning Government and Education Webinar: SQL Server—Advanced Performance Tuning
Government and Education Webinar: SQL Server—Advanced Performance Tuning
SolarWinds
 
Government and Education Webinar: Recovering IP Addresses on Your Network
Government and Education Webinar: Recovering IP Addresses on Your NetworkGovernment and Education Webinar: Recovering IP Addresses on Your Network
Government and Education Webinar: Recovering IP Addresses on Your Network
SolarWinds
 
Government and Education Webinar: Optimize Performance With Advanced Host Mon...
Government and Education Webinar: Optimize Performance With Advanced Host Mon...Government and Education Webinar: Optimize Performance With Advanced Host Mon...
Government and Education Webinar: Optimize Performance With Advanced Host Mon...
SolarWinds
 
Government and Education Webinar: Conquering Remote Work IT Challenges
Government and Education Webinar: Conquering Remote Work IT Challenges Government and Education Webinar: Conquering Remote Work IT Challenges
Government and Education Webinar: Conquering Remote Work IT Challenges
SolarWinds
 

More from SolarWinds (20)

SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...
SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...
SolarWinds Government and Education Webinar: Greatest SolarWinds Features I N...
 
SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...
SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...
SolarWinds Government and Education Webinar: Gaps Exist in Your Monitoring In...
 
Government Webinar: Alerting and Reporting in the Age of Observability
Government Webinar: Alerting and Reporting in the Age of ObservabilityGovernment Webinar: Alerting and Reporting in the Age of Observability
Government Webinar: Alerting and Reporting in the Age of Observability
 
Government and Education Webinar: Full Stack Observability
Government and Education Webinar: Full Stack ObservabilityGovernment and Education Webinar: Full Stack Observability
Government and Education Webinar: Full Stack Observability
 
Government and Education Webinar: Public Sector Cybersecurity Survey - What I...
Government and Education Webinar: Public Sector Cybersecurity Survey - What I...Government and Education Webinar: Public Sector Cybersecurity Survey - What I...
Government and Education Webinar: Public Sector Cybersecurity Survey - What I...
 
Becoming Secure By Design: Questions You Should Ask Your Software Vendors
Becoming Secure By Design: Questions You Should Ask Your Software VendorsBecoming Secure By Design: Questions You Should Ask Your Software Vendors
Becoming Secure By Design: Questions You Should Ask Your Software Vendors
 
Government and Education Webinar: Real-Time Mission, CIO, and Command Dashboards
Government and Education Webinar: Real-Time Mission, CIO, and Command DashboardsGovernment and Education Webinar: Real-Time Mission, CIO, and Command Dashboards
Government and Education Webinar: Real-Time Mission, CIO, and Command Dashboards
 
Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: Simplify Your Database Performance Manageme...Government and Education Webinar: Simplify Your Database Performance Manageme...
Government and Education Webinar: Simplify Your Database Performance Manageme...
 
Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...
Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...
Government and Education Webinar: SolarWinds Orion Platform: Audit and Stream...
 
Government and Education Webinar: Leverage Automation to Improve IT Operations
Government and Education Webinar: Leverage Automation to Improve IT OperationsGovernment and Education Webinar: Leverage Automation to Improve IT Operations
Government and Education Webinar: Leverage Automation to Improve IT Operations
 
Government and Education Webinar: Improving Application Performance
Government and Education Webinar: Improving Application PerformanceGovernment and Education Webinar: Improving Application Performance
Government and Education Webinar: Improving Application Performance
 
Government and Education: IT Tools to Support Your Hybrid Workforce
Government and Education: IT Tools to Support Your Hybrid WorkforceGovernment and Education: IT Tools to Support Your Hybrid Workforce
Government and Education: IT Tools to Support Your Hybrid Workforce
 
Government and Education Webinar: There's More Than One Way to Monitor SQL Da...
Government and Education Webinar: There's More Than One Way to Monitor SQL Da...Government and Education Webinar: There's More Than One Way to Monitor SQL Da...
Government and Education Webinar: There's More Than One Way to Monitor SQL Da...
 
SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...
SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...
SolarWinds Government and Education Webinar: Virtual Technology Briefing 08.0...
 
Government and Education Webinar: Zero-Trust Panel Discussion
Government and Education Webinar: Zero-Trust Panel Discussion Government and Education Webinar: Zero-Trust Panel Discussion
Government and Education Webinar: Zero-Trust Panel Discussion
 
Government and Education: Leveraging The SolarWinds Orion Assistance Program ...
Government and Education: Leveraging The SolarWinds Orion Assistance Program ...Government and Education: Leveraging The SolarWinds Orion Assistance Program ...
Government and Education: Leveraging The SolarWinds Orion Assistance Program ...
 
Government and Education Webinar: SQL Server—Advanced Performance Tuning
Government and Education Webinar: SQL Server—Advanced Performance Tuning Government and Education Webinar: SQL Server—Advanced Performance Tuning
Government and Education Webinar: SQL Server—Advanced Performance Tuning
 
Government and Education Webinar: Recovering IP Addresses on Your Network
Government and Education Webinar: Recovering IP Addresses on Your NetworkGovernment and Education Webinar: Recovering IP Addresses on Your Network
Government and Education Webinar: Recovering IP Addresses on Your Network
 
Government and Education Webinar: Optimize Performance With Advanced Host Mon...
Government and Education Webinar: Optimize Performance With Advanced Host Mon...Government and Education Webinar: Optimize Performance With Advanced Host Mon...
Government and Education Webinar: Optimize Performance With Advanced Host Mon...
 
Government and Education Webinar: Conquering Remote Work IT Challenges
Government and Education Webinar: Conquering Remote Work IT Challenges Government and Education Webinar: Conquering Remote Work IT Challenges
Government and Education Webinar: Conquering Remote Work IT Challenges
 

Recently uploaded

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 

Welcome To The 2016 Query Store!

  • 1. Welcome To The 2016 Query Store! Janis Griffin Senior DBA / Performance Evangelist
  • 2. 2 • Senior DBA / Performance Evangelist for Solarwinds • JanisGriffin@solarwinds.com • Twitter® - @DoBoutAnything • Current – 25+ Years in Oracle®, SQL Server®, ASE, and now MySQL® • DBA and Developer • Specialize in Performance Tuning • Review Database Performance for Customers and Prospects • Common Question – How do I tune it? Who am I © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 3. 3 • What is Query Store? • In the Beginning: Tracing, DMVs & Extended Events • Overview of Query Store • Why use Query Store? • Benefits & Gotchas • How Query Store Works • Enabling, configuring & managing it • Best practice considerations – configuration & storage • Performance Impact • What’s New In 2017? • Reporting & Several Use Cases • Demos - using both scripts & SSMS Agenda © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 4. 4 • User complains query is slow • DBA says nothing has changed • No new releases • No additional load • What changed? • Changes in data causing out-of-date statistics • Changes in execution parameters • Parameter sniffing and/or data skew • System changes • Troubleshooting plan changes difficult in previous versions • Had to trace • Had to know xQuery to decipher the plan cache XML In the Beginning… © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 5. 5 • <2005 had tracing • High overhead • Difficult to use (had to start & stop) • 2005+ DMVs: dm_exec_cached_plans & query_stats • Real time only or since last restart or clear • Can’t see history of plan changes or regression overtime • 2012+ Extended Events • Easier to use than trace • System Health session on by default • No history of plan changes / regression In the Beginning… © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 6. 6 • New feature in 2016, Improved in 2017 • Provides insight on Query Plans • Useful in troubleshooting performance degradation • Quickly find differences when query plan changes • Can see history of plans and runtime statistics • Data is persisted in database • Not just stored in memory • Shows workload and database usage patterns • Makes upgrades easier • Between versions of SQL Server • Put in compatibility mode 100 (lowest) or keep at prior level • Turn on query store • Collect representative workload • Force plans where needed What is Query Store? © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 7. 7 • Simplifies performance tuning • Can see plan changes & quickly compare their differences • Can aggregate runtime statistics over different time intervals • Can enable at database level • You get to control when, where and how you use it • Tracks both runtime and compile time metrics • Has graphical interface in SSMS • Supported on all SQL Server editions Benefits Of Using Query Store © 2017 SolarWinds Worldwide, LLC. All rights reserved. 2016 2017
  • 8. 8 • Allows forcing or pinning of a better plan for a query • Can be a quick temporary fix • However, can be easily forgotten • When data and/or schema changes • Easy T-SQL for scripting • Can quickly find queries: • Which frequently fail • Which use literals • Which are resource intensive and/or most regressed over time • Many SPs, QSD Wait types, & Extended Events • For management purposes Benefits – cont. © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 9. 9 How Query Store Works https://msdn.microsoft.com/en-us/library/mt631173.aspx© 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 10. 10 How Query Store Works – cont. https://msdn.microsoft.com/en-us/library/mt631173.aspx © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 11. 11 • Query Store is local for each database • Is disabled by default • To enable in SSMS Enabling the Query Store © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 12. 12 • SSMS • T-SQL Changing Query Store Settings ALTER DATABASE AdventureWorks SET QUERY_STORE = ON ( OPERATION_MODE = READ_WRITE, CLEANUP_POLICY = ( STALE_QUERY_THRESHOLD_DAYS = 30 ), DATA_FLUSH_INTERVAL_SECONDS = 900, MAX_STORAGE_SIZE_MB = 100, INTERVAL_LENGTH_MINUTES = 10); © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 13. 13 • https://msdn.microsoft.com/en-us/library/dn818146.aspx View Query Store Settings select * from sys.database_query_store_options; Must watch size! If full or state changes, errors aren’t written to log. Monitor actual_state. © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 14. 14 • Operation Mode (Requested) / operation_mode • Default value: Off • Valid values are Off, Read Write, Read Only • T-SQL: off, read_write, read_only • Actual operation mode can change to “read only” with full • Consider monitoring – change not written to logs • Data Flush Interval (Minutes) • When data is written from memory to disk • Default is 15 minutes • T-SQL: DATA_FLUSH_INTERVAL_SECONDS • 900 secs = 15 min Query Store Settings © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 15. 15 • Statistics Collection Interval • Defaults to 1 hour • Consider changing to 10 minutes to get granular aggregation • Higher frequency will require more storage • Lowest level – 1 minute • T-SQL: INTERVAL_LENGTH_MINUTES • Max Size (MB) • Maximum size allocated to the Query Store • Defaults to 100 MB • Stored in primary file of database • When full, changes to read-only • T-SQL: MAX_STORGE_SIZE_MB Query Store Settings – cont. ALTER DATABASE AdventureWorks SET QUERY_STORE CLEAR; © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 16. 16 • Query Store Capture Mode • ‘All’ collects all plans (default) • ‘Auto’ captures queries based on resource consumption • ‘None’ stops the capture process • T-SQL: QUERY_CAPTURE_MODE • Size Based Cleanup Mode • Activates data cleanup when it reaches maximum size • 2016 - defaults to ‘Off’, 2017 – defaults to ‘Auto’ • Consider changing to ‘Auto’ • Flushes older queries and trivial plans as new data comes in • Will not change to ‘read only’ • T-SQL: SIZE_BASED_CLEANUP_MODE Query Store Settings – cont. © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 17. 17 • Stale Query Threshold (Days) • Duration to retain query store statistics • Default 30 days • T-SQL: CLEANUP_POLICY (STALE_QUERY_THRESHOLD_DAYS) • MAX_PLANS_PER_QUERY • Default is 200 plans • Have you ever seen 200 plans to 1 query? • Consider changing to something less • Must change via T-SQL not in SSMS Query Store Settings– cont. © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 18. 18 • Consider enabling in the MODEL database • In SSMS - no Query Store property in MODEL db • Need to turn on via T-SQL • ALTER DATABASE MODEL SET QUERY_STORE=ON; • Consider proper sizing of Query Store • Default is 100mb • May be too small for busy database • By default, it converts to read-only when full select max_storage_size_mb - current_storage_size_mb qs_free_space_mb from sys.database_query_store_options; Query Store Considerations © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 19. 19 • Disabled by default • Need to enable at each individual database level • Can modify Model so it’s on by default • Consider sizing / performance implications • Can’t enable for master or tempdb • Can’t enable for Read-Only databases • E.g. AG replication for read-only • No global way to control configuration • Without manual scripting or setting up Model DB • DBAs can easily change in SSMS so hard to track • Changes to QS settings are logged in ERRORLOG Gotchas Of Using Query Store © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 20. 20 • Query Store (QS) requires care & feeding • Default sizes may be too small for a busy database • If QS storage is full, switches to READ-Only mode • May miss important performance info • Query Store data is stored in primary file • May conflict or compete for resource with user data • Can add 3-5% load to the database load • May take longer database restores • Plans may contain literal values (HIPAA) • No additional context – Who ran it, etc… Gotchas – cont. © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 21. 21 • Don’t blindly turn it on / plan, plan, plan • Consider what you will use it for • Which databases are enabled / what’s the retention period • How will you manage it? • Must monitor QS status, performance & storage • Create standard setup & configuration scripts • Consider backups / restores • Restore into development / test or NOT • Replication – sensitive data, forced plans, etc… Query Store Management © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 22. 22 • Microsoft states 3% to 5% impact on average • Depends on • # of databases monitored • Transaction / Compile rates • Query Store Configurations • Can monitor Query Store via • Perfmon Counters • QDS Wait Types • Extended Events Query Store Performance Impact © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 23. 23 Query Store Performance Impact QS Events 2016 – 58 2017 – 90+ Not very well documented - 17 in 2016 - 20 in 2017 © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 24. 24 • sp_query_store_flush_db; • Flushes in-memory portion of data to disk • sp_query_store_reset_exec_stats plan_id; • Clears runtime stats for a specific query plan • sp_query_store_force_plan query_id, plan_id; • Enables forcing a particular plan, if forcing fails a Xevent is fired to optimize normally • sp_query_store_unforce_plan query_id, plan_id; • Removes forcing a particular plan for a particular query • sp_query_store_remove_plan plan_id; • Removes a single plan from the Query Store • sp_query_store_remove_query query_id; • Removes a single query, all associated plans and statistics from Query Store Management – Stored Procedures © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 25. © 2017 SolarWinds Worldwide, LLC. All rights reserved. … … … … … 25 • query_store_query_text - text entered by user, includes whites space, hints, etc... msdn-dn818159.aspx • query_context_settings - unique combinations of plan affecting settings under which queries run msdn-dn818148.aspx • query_store_plan - execution plan information for queries msdn-dn818155.aspx • query_store_query - query information and overall aggregated runtime statistics msdn-dn818156.aspx • query_store_runtime_stats - runtime execution statistics for queries (avg,min,max,std deviation) msdn-dn818158.aspx • query_store_runtime_stats_interval - start and end times intervals for statistics collected msdn-dn818147.aspx2 Query Store DMVs
  • 26. 26 • SSMS Reports • Force Plans • View Forced Plans • Compare Plans • Find queries with high variation • See overall resource consumption • T-SQL • Useful Queries • Find Multiple Plans • Find Long Running Queries • Find Queries Doubling in time • Find AD-Hoc Queries • Using literals • Plan Guides versus Forced Plans Query Store Reporting & Use Cases © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 27. • New Wait Stats Store • Plus plan store • And runtime stats store • On = 1 (default) • T-SQL: WAIT_STATS_CAPTURE_MODE • OFF = 0 • New 23 Wait Categories • Summarizes wait types • Common resolution • Using-the-query-store © 2017 SolarWinds Worldwide, LLC. All rights reserved. What’s New In 2017 Query Store? Join to query_store_plan and query_store_runtime_stats_interval
  • 28. © 2017 SolarWinds Worldwide, LLC. All rights reserved. 2017 Query Store – Cont. • Find Top 10 Queries Waiting The Most Over 1 hour waiting on Parallelism SELECT TOP 10 qt.query_sql_text, q.query_id, p.plan_id, ws.wait_category_desc, sum(total_query_wait_time_ms) AS sum_total_wait_ms FROM sys.query_store_wait_stats ws JOIN sys.query_store_plan p ON ws.plan_id = p.plan_id JOIN sys.query_store_query q ON p.query_id = q.query_id JOIN sys.query_store_query_text qt ON q.query_text_id = qt.query_text_id WHERE ws.wait_category_desc != 'Idle' GROUP BY qt.query_sql_text, q.query_id, p.plan_id, ws.wait_category_desc ORDER BY sum_total_wait_ms DESC
  • 29. © 2017 SolarWinds Worldwide, LLC. All rights reserved. 2017 Query Store – Cont. • Query Store and the New Adaptive Query Processing • Captures and can force batch mode adaptive join plan • Can force plans with interleaved execution (MSTVFs)
  • 30. • Command-line Tools • sqlcmd & bcp • SSMS • Connect remotely from Windows • Includes PowerShell • Visual Studio Code • How-to-develop-use-vscode • SQL Server Data Tools (SSDT) • For Visual Studio • Build project on Windows • Deploy to Linux • SQL Operations Studio • Installs on Linux/Windows/MacOS • GUI interface – sqlops https://docs.microsoft.com/en-us/sql/sql-operations-studio/download Client Connectivity & Tools for 2017 © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 31. 31 • Review Properties • Database defaults • Turn on QS in Model • Database with QS on • Show full QS • Look at T-SQL Code • Multiplan Queries • Long running – doubled in duration (microseconds) • Parameter Canidates • Review SSMS Reports • Force a Plan • Show Forced Plan Failures • Extended Events • Q & A Demo Time © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 32. 32 SSMS - Regressed Queries Report © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 34. 34 Top Resource Consuming Queries Canceled Failed © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 35. 35 Tracked Queries © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 36. 36 Compare Query Plans © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 37. 37 Forcing Plans SELECT p.plan_id, p.query_id, q.object_id as containing_object_id, force_failure_count, last_force_failure_reason_desc FROM sys.query_store_plan p JOIN sys.query_store_query q on p.query_id = q.query_id WHERE is_forced_plan = 1; To remove force plan via TSQL: sp_query_store_unforce_plan 615,665; © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 38. 38 Failed Forced Plans Reasons why plan forcing failed 0: no failure 8637: ONLINE_INDEX_BUILD 8683: INVALID_STARJOIN 8684: TIME_OUT 8689: NO_DB 8690: HINT_CONFLICT 8691: SETOPT_CONFLICT 8694: DQ_NO_FORCING_SUPPORTED 8698: NO_PLAN 8712: NO_INDEX 8713: VIEW_COMPILE_FAILED <other value>: GENERAL_FAILURE © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 39. 39 • https://msdn.microsoft.com/en-us/library/dn817826.aspx ;WITH Query_MultPlans AS ( SELECT COUNT(*) AS cnt, q.query_id FROM sys.query_store_query_text AS qt JOIN sys.query_store_query AS q ON qt.query_text_id = q.query_text_id JOIN sys.query_store_plan AS p ON p.query_id = q.query_id GROUP BY q.query_id HAVING COUNT(distinct plan_id) > 1 ) Useful Query Store Queries SELECT q.query_id, object_name(object_id) AS ContainingObject, query_sql_text, plan_id, convert(xml,p.query_plan) AS plan_xml, p.last_compile_start_time, p.last_execution_time FROM Query_MultPlans AS qm JOIN sys.query_store_query AS q ON qm.query_id = q.query_id JOIN sys.query_store_plan AS p ON q.query_id = p.query_id JOIN sys.query_store_query_text qt ON qt.query_text_id = q.query_text_id ORDER BY query_id, plan_id; GO © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 40. 40 Multi-plan Queries © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 41. 41 ;WITH AggregatedDurationLastHour AS ( SELECT q.query_id, SUM(count_executions * avg_duration) AS total_duration, COUNT (distinct p.plan_id) AS number_of_plans FROM sys.query_store_query_text AS qt JOIN sys.query_store_query AS q ON qt.query_text_id = q.query_text_id JOIN sys.query_store_plan AS p ON q.query_id = p.query_id JOIN sys.query_store_runtime_stats AS rs ON rs.plan_id = p.plan_id JOIN sys.query_store_runtime_stats_interval AS rsi ON rsi.runtime_stats_interval_id = rs.runtime_stats_interval_id WHERE rsi.start_time >= DATEADD(hour, -1, GETUTCDATE()) AND rs.execution_type_desc = 'Regular' GROUP BY q.query_id ) ,OrderedDuration AS ( SELECT query_id, total_duration, number_of_plans, ROW_NUMBER () OVER (ORDER BY total_duration DESC, query_id) AS RN FROM AggregatedDurationLastHour ) Long Running – Last Hour SELECT qt.query_sql_text, object_name(q.object_id) AS containing_object, q.query_id, p.plan_id,rsi.start_time as interval_start, rs.avg_duration, CONVERT(xml, p.query_plan) AS query_plan_xml FROM OrderedDuration od JOIN sys.query_store_query AS q ON q.query_id = od.query_id JOIN sys.query_store_query_text AS qt ON q.query_text_id = qt.query_text_id JOIN sys.query_store_plan AS p ON q.query_id = p.query_id JOIN sys.query_store_runtime_stats AS rs ON rs.plan_id = p.plan_id JOIN sys.query_store_runtime_stats_interval AS rsi ON rsi.runtime_stats_interval_id = rs.runtime_stats_interval_id WHERE rsi.start_time >= DATEADD(hour, -1, GETUTCDATE()) AND number_of_plans > 1 ORDER BY total_duration DESC, query_id, rsi.runtime_stats_interval_id, p.plan_id © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 42. 42 Long Running – Last Hour © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 43. © 2017 SolarWinds Worldwide, LLC. All rights reserved. 43 SELECT qt.query_sql_text, q.query_id, qt.query_text_id, rs1.runtime_stats_id AS runtime_stats_id_1, rsi1.start_time AS interval_1, p1.plan_id AS plan_1, rs1.avg_duration AS avg_duration_1, rs2.avg_duration AS avg_duration_2, p2.plan_id AS plan_2, rsi2.start_time AS interval_2, rs2.runtime_stats_id AS runtime_stats_id_2 FROM sys.query_store_query_text AS qt JOIN sys.query_store_query AS q ON qt.query_text_id = q.query_text_id JOIN sys.query_store_plan AS p1 ON q.query_id = p1.query_id JOIN sys.query_store_runtime_stats AS rs1 ON p1.plan_id = rs1.plan_id Execution Time - Doubled in Last 48hrs JOIN sys.query_store_runtime_stats_interval AS rsi1 ON rsi1.runtime_stats_interval_id = rs1.runtime_stats_interval_id JOIN sys.query_store_plan AS p2 ON q.query_id = p2.query_id JOIN sys.query_store_runtime_stats AS rs2 ON p2.plan_id = rs2.plan_id JOIN sys.query_store_runtime_stats_interval AS rsi2 ON rsi2.runtime_stats_interval_id = rs2.runtime_stats_interval_id WHERE rsi1.start_time > DATEADD(hour, -48, GETUTCDATE()) AND rsi2.start_time > rsi1.start_time AND p1.plan_id <> p2.plan_id AND rs2.avg_duration > 2*rs1.avg_duration ORDER BY q.query_id, rsi1.start_time, rsi2.start_time;
  • 44. 44 Execution Time - Doubled in Last 48hrs Plan_1 = 370ms Plan_2 = 3.7s © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 45. 45 • Query Store helps you manage query performance • See plan changes & performance regression • Find bad parameter sniffing & stale statistics • See resource consumption at query & database level • Info is only kept in database where query runs • If you run them out of master or tempdb, they won’t be kept • Need to plan & maintain the Query Store • Size appropriately for workload • Consider how long to keep the data • Consider backups & restores Summary © 2017 SolarWinds Worldwide, LLC. All rights reserved.
  • 46. The SolarWinds, SolarWinds & Design, Orion, and THWACK trademarks are the exclusive property of SolarWinds Worldwide, LLC or its affiliates, are registered with the U.S. Patent and Trademark Office, and may be registered or pending registration in other countries. All other SolarWinds trademarks, service marks, and logos may be common law marks or are registered or pending registration. All other trademarks mentioned herein are used for identification purposes only and are trademarks of (and may be registered trademarks) of their respective companies. Thank You!