SlideShare a Scribd company logo
SQLSaturday Paris 2015
SQL 2016 Query Store
Et si mes queries m'étaient contées...
SQLSaturday Paris 2015
Merci à nos sponsors…
SQLSaturday Paris 2015
Merci à nos volontaires…
SQLSaturday Paris 2015
Isabelle Van Campenhoudt
Isabelle Van
Campenhoud
t
SQL Server MVP, Bruxelles
Consultant, speaker, trainer, PASS V-Chapter Leader,
GUSS Board member
Managing partner de www.ShareQL.com
SQL Server depuis 1999
Blog: http://thesqlgrrrl.wordpress.com/
ivc@ShareQL.com
@thesqlgrrrl
Isabelle
Van Campenhoudt
4
globalfrench.sqlpass.org
SQLSaturday Paris 2015
Introduction
Genese d’une requete
Plans d’executions
Le store
Scenarios
Conclusions – Q&A
Agenda
SQLSaturday Paris 2015
Si mes queries m’étaient contées
Ou pas…
Dans le
merveilleux
monde de la
performance…
SQLSaturday Paris 2015
Tout doucement le matin….
 Lenteur de naissance
 Lenteur soudaine
 Lenteur lentement plus leeente
 Row by agonizing row…
SQLSaturday Paris 2015
Frustrations
Qui ???
Pourquoi ???
SQLSaturday Paris 2015
SQLSaturday Paris 2015
SQLSaturday Paris 2015
Algebrization
Step 1:
Resolution
de Nom
Step 2:
Choix des
types
Step 3:
Aggregation
SQLSaturday Paris 2015
Du parse à l’arbre logique
SELECT P.ProductNumber, P.ProductID,
total_qty = SUM(I.Quantity)
FROM Production.Product P
INNER JOIN Production.ProductInventory AS I
ON I.ProductID = P.ProductIDWHERE
P.ProductNumber LIKE N'T%'GROUP BY
P.ProductID,
SQLSaturday Paris 2015
Production du plan
d’execution
SQLSaturday Paris 2015
Le Plan d’éxecution
Is the plan cheap enough?b
Si oui, utilisez-le Si non démarrez l’optimisation
Appliquer la simplification
Processus de normalisation du query tree et application de transformations basiques
Est-ce un plan trivial?
Si oui, utilisez-le Si non continuez.
Il y a –t-il un plan dans le cache?
Si oui, utilisez-le Si non continuez.
SQLSaturday Paris 2015
Optimisation “cost based”
Phase 0
• Explorez les règles fondamentales et les options de jointures hash/nested
• le plan a-t-il coût de moins de 0,2 ? Dans l'affirmative, l'utiliser. Si non, continuer.
Phase 1
•Explorez plus de règles et modifier l’ordre des jointures. Si le meilleur plan (moins cher) coûte moins de 1.0,
utilisez ce plan.
•Si non, alors si MAXDOP > 0 et c'est un système SMP et le min coût > coût seuil du parallélisme, puis
utilisez un plan parallèle.
•Comparer le coût du plan parallèle avec le meilleur plan de série et executer le moins cher des deux
phase 2.
• Explorer les options et opter pour le plan moins cher après un nombre limité
d'explorations.
SQLSaturday Paris 2015
Bonnes pratiques ou…
droit d’influence….
 Hints
 Plan guide
 TraceFlag
 Forced Parameterization
SQLSaturday Paris 2015
DEMO
Visualiser les plans
d’execution
SQLSaturday Paris 2015
Live ou Post Mortem
Obtenir des informations sur
l’execution d’une requête
• Set statistics
• Trace
• Data collector
• DMV
• Reports
• Extended Events….
SQLSaturday Paris 2015
Live query statistics
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.
Not supported
• columnstore indexes
• memory optimized tables
• Natively compiled stored procedures
SQLSaturday Paris 2015
DEMO
Visualiser les plans
d’execution en temps réel
SQLSaturday Paris 2015
Le Candy Query Store
SQLSaturday Paris 2015
Query Store
Qui ???
Pourquoi ???
SQLSaturday Paris 2015
Determiner
• Le nombre de
fois ou une
requete a été
exécutée
dans une
fenetre de
temps
Identifier
• top n requêtes
dans les X
heures
passes
(execution
time, memory
consumption,
etc.) in the
past x hours.
Audit
• Historique des
plans
d’executions
d’une requête
Analyser
• Le profil
d’utilisation
des
ressources
d’une
database
donnée
(cpu,ram,io)
Regressions
• Trouver et
corriger une
regression de
plan
d’execution en
forcant un
plan.
Les Scenarios du Query store
Qui ??? Pourquoi ???
SQLSaturday Paris 2015
Les “rayons” du Store
SQLSaturday Paris 2015
The plan store
SQLSaturday Paris 2015
The statistics store
SQLSaturday Paris 2015
Configuration Options
• Can be READ_WRITE or READ_ONLY.OPERATION_MODE
• Configure the STALE_QUERY_THRESHOLD_DAYS argument to specify the number of days to retain data in the
query store.CLEANUP_POLICY
• Determines the frequency at which data written to the query store is persisted to disk. To optimize for
performance, data collected by the query store is asynchronously written to the disk. The frequency at which this
asynchronous transfer occurs is configured via DATA_FLUSH_INTERVAL_SECONDS.
DATA_FLUSH_INTERVAL_SECONDS
• Configures the maximum size of the query store. If the data in the query store hits the
MAX_STORAGE_SIZE_MB limit, the query store automatically changes the state from read-write to read-only
and stops collecting new data.
MAX_STORAGE_SIZE_MB
• Determines the time interval at which runtime execution statistics data is aggregated into the query store. To
optimize for space usage, the runtime execution statistics in the Runtime Stats Store are aggregated over a fixed
time window. This fixed time window is configured via INTERVAL_LENGTH_MINUTES.
INTERVAL_LENGTH_MINUTES
• C ontrols whether the cleanup process will be automatically activated when total amount of data gets close to
maximum size.SIZE_BASED_CLEANUP_MODE
• Designates if the Query Store captures all queries, or relevant queries based on execution count and resource
consumption, or stops adding new queries and just tracks current queries.QUERY_CAPTURE_MODE
• An integer representing the maximum number of plans maintained for each query.MAX_PLANS_PER_QUERY
SQLSaturday Paris 2015
DEMO
Utiliser le query store
SQLSaturday Paris 2015
T-SQL management
• •sys.database_query_store_options (Transact-SQL)
• •sys.query_context_settings (Transact-SQL)
• •sys.query_store_plan (Transact-SQL)
• •sys.query_store_query (Transact-SQL)
• •sys.query_store_query_text (Transact-SQL)
• •sys.query_store_runtime_stats (Transact-SQL)
• •sys.query_store_runtime_stats_interval (Transact-SQL)
• Query Store Stored Procedures
7 vues du
catalogue
• •sp_query_store_flush_db (Transact-SQL)
• •sp_query_store_reset_exec_stats (Transact-SQL)
• •sp_query_store_force_plan (Transact-SQL)
• •sp_query_store_unforce_plan (Transact-SQL)
• •sp_query_store_remove_plan (Transct-SQL)
• •sp_query_store_remove_query (Transact-SQL)
6 stored
procedures
• query_store_background_task_persist_started - Fired if the background task for Query Store data persistence started execution
• •query_store_background_task_persist_finished - Fired if the background task for Query Store data persistence is completed successfully
• •query_store_load_started - Fired when query store load is started
• •query_store_db_data_structs_not_released - Fired if Query Store data structures are not released when feature is turned OFF.
• •query_store_db_diagnostics - Periodically fired with Query Store diagnostics on database level.
• •query_store_db_settings_changed - Fired when Query Store settings are changed.
• •query_store_db_whitelisting_changed - Fired when Query Store database whitelisting state is changed.
• •query_store_global_mem_obj_size_kb - Periodically fired with Query Store global memory object size.
• •query_store_size_retention_cleanup_started - Fired when size retention policy clean-up task is started.
• ……….
19 new
extended
events:
SQLSaturday Paris 2015
Q&A
SQLSaturday Paris 2015
Pour aller plus loin
 Optimisateur de requete (webcast GUSS)
https://www.youtube.com/watch?v=sMG7v9Y
vPX8
 https://msdn.microsoft.com/en-
us/library/dn817826.aspx
 https://msdn.microsoft.com/en-
us/library/dn818149.aspx
SQLSaturday Paris 2015
…Et en plus on peut gagner des cadeaux
http://GUSS.pro/sqlsat

More Related Content

PPT
Ashawr perf kscope
PDF
Ash and awr performance data2
PDF
What are you waiting for? (#SQLSat211)
PPTX
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
PDF
Learn thai with pat orgirl 201307
PDF
Dat202 Techdays Paris 2015: PowerBI un an après
PDF
Tuning Sql Server for SharePoint--- Community Day Belgium 2013
Ashawr perf kscope
Ash and awr performance data2
What are you waiting for? (#SQLSat211)
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
Learn thai with pat orgirl 201307
Dat202 Techdays Paris 2015: PowerBI un an après
Tuning Sql Server for SharePoint--- Community Day Belgium 2013

Viewers also liked (20)

PDF
QUALITY MANAGEMENT
PDF
Projeto AN9 - Uberlândia
PPTX
Portfolio henderson a
PDF
Cycle Power BI Part1
PDF
Examen sybase - Administration base de donnees
PDF
To g chapter season 2 chapter 6.cv
PPTX
SharePoint 2016 les nouveautés / yosTour Lyon / Etienne Bailly | Benoit Jester
PPTX
Microsoft BI demystified: SharePoint 2016 BI or for PowerBI v2?
PDF
Relational databases & NoSQL databases
PPTX
Smci
PPTX
Dart structured web apps
PPTX
SharePoint 2016 BI or PowerBI v2 - SharePoint Saturday Cambridge
PPTX
บทที่ ๔ สื่อการสอนและห้องเรียนภาษาไทยในฐานะภาษาต่างประเทศ
PPTX
Présentation JSS2015 - Le Query Store de SQL Server 2016
PPTX
PowerBI v2, Power to the People, 1 year later
PPTX
PPTX
SQL Saturday 510 Paris 2016 - Query Store session - final
PDF
Unbreakable Sharepoint 2016 With SQL Server 2016 availability groups
PPTX
SharePoint 2016 The Future is Hybrid, what you need to know about it
PPTX
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
QUALITY MANAGEMENT
Projeto AN9 - Uberlândia
Portfolio henderson a
Cycle Power BI Part1
Examen sybase - Administration base de donnees
To g chapter season 2 chapter 6.cv
SharePoint 2016 les nouveautés / yosTour Lyon / Etienne Bailly | Benoit Jester
Microsoft BI demystified: SharePoint 2016 BI or for PowerBI v2?
Relational databases & NoSQL databases
Smci
Dart structured web apps
SharePoint 2016 BI or PowerBI v2 - SharePoint Saturday Cambridge
บทที่ ๔ สื่อการสอนและห้องเรียนภาษาไทยในฐานะภาษาต่างประเทศ
Présentation JSS2015 - Le Query Store de SQL Server 2016
PowerBI v2, Power to the People, 1 year later
SQL Saturday 510 Paris 2016 - Query Store session - final
Unbreakable Sharepoint 2016 With SQL Server 2016 availability groups
SharePoint 2016 The Future is Hybrid, what you need to know about it
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
Ad

Similar to SQL 2016 Query Store: Et si mes queries m'étaient contées... (20)

PPTX
SQL Server 2016 Query store
PDF
Live Query Statistics & Query Store in SQL Server 2016
PDF
Sql server 2016 rc 3 query store overview and architecture
PPTX
Geek Sync | Intro to Query Store
PPTX
05_DP_300T00A_Optimize.pptx
PPTX
SQL TUNING 101
PPTX
DBA Commands and Concepts That Every Developer Should Know
PPTX
IDERA Live | Leverage the Query Store for Better SQL Server Performance
PDF
Lucian Precup - Back to the Future: SQL 92 for Elasticsearch? - NoSQL matters...
PDF
Percona live-2012-optimizer-tuning
PPTX
Query Store and live Query Statistics
PDF
Welcome To The 2016 Query Store!
PPTX
DBA Commands and Concepts That Every Developer Should Know
PPTX
Back to the future : SQL 92 for Elasticsearch @nosqlmatters Paris
PDF
The Science of DBMS: Query Optimization
PPTX
Oracle performance tuning_sfsf
PDF
3 query tuning techniques every sql server programmer should know
PPT
Database performance tuning and query optimization
PPTX
Sql and PL/SQL Best Practices I
PPT
Oracle SQL Tuning
SQL Server 2016 Query store
Live Query Statistics & Query Store in SQL Server 2016
Sql server 2016 rc 3 query store overview and architecture
Geek Sync | Intro to Query Store
05_DP_300T00A_Optimize.pptx
SQL TUNING 101
DBA Commands and Concepts That Every Developer Should Know
IDERA Live | Leverage the Query Store for Better SQL Server Performance
Lucian Precup - Back to the Future: SQL 92 for Elasticsearch? - NoSQL matters...
Percona live-2012-optimizer-tuning
Query Store and live Query Statistics
Welcome To The 2016 Query Store!
DBA Commands and Concepts That Every Developer Should Know
Back to the future : SQL 92 for Elasticsearch @nosqlmatters Paris
The Science of DBMS: Query Optimization
Oracle performance tuning_sfsf
3 query tuning techniques every sql server programmer should know
Database performance tuning and query optimization
Sql and PL/SQL Best Practices I
Oracle SQL Tuning
Ad

More from Isabelle Van Campenhoudt (10)

PDF
From Excel hero to Power BI champion
PDF
Excel patterns in Power BI: From Excel hero to Power BI Champion
PDF
Power BI Report Server & Office Online Server
PDF
Retour d'expérience Power BI
PPTX
Espc17 make your share point fly by tuning and optimising sql server
PDF
Azure Data Factory-Rebuild 2017
PDF
Power Bi, le tour complet 2017
PPTX
SQL azure database for DBA
PPTX
Ms Cloud Summit 2017 - Power Bi, le tour complet 2017
PPTX
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
From Excel hero to Power BI champion
Excel patterns in Power BI: From Excel hero to Power BI Champion
Power BI Report Server & Office Online Server
Retour d'expérience Power BI
Espc17 make your share point fly by tuning and optimising sql server
Azure Data Factory-Rebuild 2017
Power Bi, le tour complet 2017
SQL azure database for DBA
Ms Cloud Summit 2017 - Power Bi, le tour complet 2017
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...

Recently uploaded (20)

PPTX
1. Introduction to Computer Programming.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Getting Started with Data Integration: FME Form 101
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
1. Introduction to Computer Programming.pptx
Unlocking AI with Model Context Protocol (MCP)
Getting Started with Data Integration: FME Form 101
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Group 1 Presentation -Planning and Decision Making .pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Tartificialntelligence_presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
SOPHOS-XG Firewall Administrator PPT.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

SQL 2016 Query Store: Et si mes queries m'étaient contées...

  • 1. SQLSaturday Paris 2015 SQL 2016 Query Store Et si mes queries m'étaient contées...
  • 2. SQLSaturday Paris 2015 Merci à nos sponsors…
  • 3. SQLSaturday Paris 2015 Merci à nos volontaires…
  • 4. SQLSaturday Paris 2015 Isabelle Van Campenhoudt Isabelle Van Campenhoud t SQL Server MVP, Bruxelles Consultant, speaker, trainer, PASS V-Chapter Leader, GUSS Board member Managing partner de www.ShareQL.com SQL Server depuis 1999 Blog: http://thesqlgrrrl.wordpress.com/ ivc@ShareQL.com @thesqlgrrrl Isabelle Van Campenhoudt 4 globalfrench.sqlpass.org
  • 5. SQLSaturday Paris 2015 Introduction Genese d’une requete Plans d’executions Le store Scenarios Conclusions – Q&A Agenda
  • 6. SQLSaturday Paris 2015 Si mes queries m’étaient contées Ou pas… Dans le merveilleux monde de la performance…
  • 7. SQLSaturday Paris 2015 Tout doucement le matin….  Lenteur de naissance  Lenteur soudaine  Lenteur lentement plus leeente  Row by agonizing row…
  • 11. SQLSaturday Paris 2015 Algebrization Step 1: Resolution de Nom Step 2: Choix des types Step 3: Aggregation
  • 12. SQLSaturday Paris 2015 Du parse à l’arbre logique SELECT P.ProductNumber, P.ProductID, total_qty = SUM(I.Quantity) FROM Production.Product P INNER JOIN Production.ProductInventory AS I ON I.ProductID = P.ProductIDWHERE P.ProductNumber LIKE N'T%'GROUP BY P.ProductID,
  • 13. SQLSaturday Paris 2015 Production du plan d’execution
  • 14. SQLSaturday Paris 2015 Le Plan d’éxecution Is the plan cheap enough?b Si oui, utilisez-le Si non démarrez l’optimisation Appliquer la simplification Processus de normalisation du query tree et application de transformations basiques Est-ce un plan trivial? Si oui, utilisez-le Si non continuez. Il y a –t-il un plan dans le cache? Si oui, utilisez-le Si non continuez.
  • 15. SQLSaturday Paris 2015 Optimisation “cost based” Phase 0 • Explorez les règles fondamentales et les options de jointures hash/nested • le plan a-t-il coût de moins de 0,2 ? Dans l'affirmative, l'utiliser. Si non, continuer. Phase 1 •Explorez plus de règles et modifier l’ordre des jointures. Si le meilleur plan (moins cher) coûte moins de 1.0, utilisez ce plan. •Si non, alors si MAXDOP > 0 et c'est un système SMP et le min coût > coût seuil du parallélisme, puis utilisez un plan parallèle. •Comparer le coût du plan parallèle avec le meilleur plan de série et executer le moins cher des deux phase 2. • Explorer les options et opter pour le plan moins cher après un nombre limité d'explorations.
  • 16. SQLSaturday Paris 2015 Bonnes pratiques ou… droit d’influence….  Hints  Plan guide  TraceFlag  Forced Parameterization
  • 17. SQLSaturday Paris 2015 DEMO Visualiser les plans d’execution
  • 18. SQLSaturday Paris 2015 Live ou Post Mortem Obtenir des informations sur l’execution d’une requête • Set statistics • Trace • Data collector • DMV • Reports • Extended Events….
  • 19. SQLSaturday Paris 2015 Live query statistics 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. Not supported • columnstore indexes • memory optimized tables • Natively compiled stored procedures
  • 20. SQLSaturday Paris 2015 DEMO Visualiser les plans d’execution en temps réel
  • 21. SQLSaturday Paris 2015 Le Candy Query Store
  • 22. SQLSaturday Paris 2015 Query Store Qui ??? Pourquoi ???
  • 23. SQLSaturday Paris 2015 Determiner • Le nombre de fois ou une requete a été exécutée dans une fenetre de temps Identifier • top n requêtes dans les X heures passes (execution time, memory consumption, etc.) in the past x hours. Audit • Historique des plans d’executions d’une requête Analyser • Le profil d’utilisation des ressources d’une database donnée (cpu,ram,io) Regressions • Trouver et corriger une regression de plan d’execution en forcant un plan. Les Scenarios du Query store Qui ??? Pourquoi ???
  • 24. SQLSaturday Paris 2015 Les “rayons” du Store
  • 26. SQLSaturday Paris 2015 The statistics store
  • 27. SQLSaturday Paris 2015 Configuration Options • Can be READ_WRITE or READ_ONLY.OPERATION_MODE • Configure the STALE_QUERY_THRESHOLD_DAYS argument to specify the number of days to retain data in the query store.CLEANUP_POLICY • Determines the frequency at which data written to the query store is persisted to disk. To optimize for performance, data collected by the query store is asynchronously written to the disk. The frequency at which this asynchronous transfer occurs is configured via DATA_FLUSH_INTERVAL_SECONDS. DATA_FLUSH_INTERVAL_SECONDS • Configures the maximum size of the query store. If the data in the query store hits the MAX_STORAGE_SIZE_MB limit, the query store automatically changes the state from read-write to read-only and stops collecting new data. MAX_STORAGE_SIZE_MB • Determines the time interval at which runtime execution statistics data is aggregated into the query store. To optimize for space usage, the runtime execution statistics in the Runtime Stats Store are aggregated over a fixed time window. This fixed time window is configured via INTERVAL_LENGTH_MINUTES. INTERVAL_LENGTH_MINUTES • C ontrols whether the cleanup process will be automatically activated when total amount of data gets close to maximum size.SIZE_BASED_CLEANUP_MODE • Designates if the Query Store captures all queries, or relevant queries based on execution count and resource consumption, or stops adding new queries and just tracks current queries.QUERY_CAPTURE_MODE • An integer representing the maximum number of plans maintained for each query.MAX_PLANS_PER_QUERY
  • 29. SQLSaturday Paris 2015 T-SQL management • •sys.database_query_store_options (Transact-SQL) • •sys.query_context_settings (Transact-SQL) • •sys.query_store_plan (Transact-SQL) • •sys.query_store_query (Transact-SQL) • •sys.query_store_query_text (Transact-SQL) • •sys.query_store_runtime_stats (Transact-SQL) • •sys.query_store_runtime_stats_interval (Transact-SQL) • Query Store Stored Procedures 7 vues du catalogue • •sp_query_store_flush_db (Transact-SQL) • •sp_query_store_reset_exec_stats (Transact-SQL) • •sp_query_store_force_plan (Transact-SQL) • •sp_query_store_unforce_plan (Transact-SQL) • •sp_query_store_remove_plan (Transct-SQL) • •sp_query_store_remove_query (Transact-SQL) 6 stored procedures • query_store_background_task_persist_started - Fired if the background task for Query Store data persistence started execution • •query_store_background_task_persist_finished - Fired if the background task for Query Store data persistence is completed successfully • •query_store_load_started - Fired when query store load is started • •query_store_db_data_structs_not_released - Fired if Query Store data structures are not released when feature is turned OFF. • •query_store_db_diagnostics - Periodically fired with Query Store diagnostics on database level. • •query_store_db_settings_changed - Fired when Query Store settings are changed. • •query_store_db_whitelisting_changed - Fired when Query Store database whitelisting state is changed. • •query_store_global_mem_obj_size_kb - Periodically fired with Query Store global memory object size. • •query_store_size_retention_cleanup_started - Fired when size retention policy clean-up task is started. • ………. 19 new extended events:
  • 31. SQLSaturday Paris 2015 Pour aller plus loin  Optimisateur de requete (webcast GUSS) https://www.youtube.com/watch?v=sMG7v9Y vPX8  https://msdn.microsoft.com/en- us/library/dn817826.aspx  https://msdn.microsoft.com/en- us/library/dn818149.aspx
  • 32. SQLSaturday Paris 2015 …Et en plus on peut gagner des cadeaux http://GUSS.pro/sqlsat

Editor's Notes

  • #5: Rendre sexy
  • #12: Confirms that all objects exist and are visible in the security context of the user. This is where the table and column names are checked to ensure that they exist and that the user has access to them 2. Determines the final type for each node in the parse tree 3. Determines where to do any aggregations
  • #25: The query store contains two stores; a plan store for persisting the execution plan information, and a runtime stats store for persisting the execution statistics information. The number of unique plans that can be stored for a query in the plan store is limited by the max_plans_per_query configuration option. To enhance performance, the information is written to the two stores asynchronously. To minimize space usage, the runtime execution statistics in the runtime stats store are aggregated over a fixed time window. The information in these stores is visible by querying the query store catalog views.