SlideShare ist ein Scribd-Unternehmen logo
1 von 20
WORKING WITH AZURE SQL
DATABASE
Performance and tuning guide
• MVP Data Platform
• Principal Database Architect at Vita Database
Solutions
• Pass Chapter Leader at SQLManiacs
• SQL Server Database Consultant at Pythian
• Vitor.fava@vitadbsolutions.com
• http://vfava.wordpress.com
• http://www.youtube.com/vitortff
• https://groups.google.com/group/sqlmaniacs
Vitor Fava
What is SQL Database?
• Relational database service in the cloud based on the
market-leading Microsoft SQL Server engine, with mission-
critical capabilities.
• Delivers predictable performance, scalability with no
downtime, business continuity and data protection—all
with near-zero administration
• Focus on rapid app development and accelerating your
time to market, rather than managing virtual machines and
infrastructure.
• Because it’s based on the SQL Server engine, SQL
Database supports existing SQL Server tools, libraries and
APIs, which makes it easier for you to move and extend to
the cloud.
Monitor databases using the Azure portal
• In the Azure portal, you can monitor a single database’s utilization by selecting your database and
clicking the Monitoring chart;
• This brings up a Metric window that you can change by clicking the Edit chart button and add the
following metrics:
• CPU percentage
• DTU percentage
• Data IO percentage
• Database size percentage
• You can also configure alerts on the performance metrics
Monitor databases using DMVs
• The same metrics that are exposed in the portal are also available through system views:
sys.resource_stats in the logical master database of your server, and sys.dm_db_resource_stats
in the user database;
• Use sys.resource_stats if you need to monitor less granular data across a longer period of time;
• Use sys.dm_db_resource_stats if you need to monitor more granular data within a smaller time
frame;
Monitor databases using DMVs
SQL Database partially supports three categories
of dynamic management views:
• Database-related dynamic management views;
• Execution-related dynamic management views;
• Transaction-related dynamic management views;
SQL Database Advisor
• Azure SQL Database learns and adapts with your application and provides customized
recommendations enabling you to maximize the performance of your SQL databases;
• The SQL Database Advisor provides recommendations for creating and dropping indexes,
parameterizing queries, and fixing schema issues;
• The advisor assesses performance by analyzing your SQL database's usage history;
• The recommendations that are best suited for running your database’s typical workload are
recommended;
SQL Database Advisor
• Create Index recommendations appear when the SQL Database service detects a missing index
that if created, can benefit your databases workload (non-clustered indexes only);
• Drop Index recommendations appear when the SQL Database service detects duplicate indexes
(currently in preview and applies to duplicate indexes only);
• Parameterize queries recommendations appear when you have one or more queries that are
constantly being recompiled but end up with the same query execution plan. This condition opens
up an opportunity to apply forced parameterization, which will allow query plans to be cached and
reused in the future improving performance and reducing resource usage;
SQL Database Advisor
• Fix schema issues recommendations appear when the SQL Database service notices an
anomaly in the number of schema-related SQL errors happening on your Azure SQL Database.
• This recommendation typically appears when your database encounters multiple schema-related
errors (invalid column name, invalid object name, etc.) within an hour.
SQL Error Code Message
201
Procedure or function '' expects parameter '', which was not
supplied.
207 Invalid column name '*'.
208 Invalid object name '*'.
213
Column name or number of supplied values does not match table
definition.
2812 Could not find stored procedure '*'.
8144 Procedure or function * has too many arguments specified.
Azure SQL Database Query Performance
Insight
• Managing and tuning the performance of relational databases is a challenging task that requires
significant expertise and time investment;
• Query Performance Insight allows you to spend less time troubleshooting database performance
by providing the following:
• Deeper insight into your databases resource (DTU) consumption;
• The top queries by CPU/Duration/Execution count, which can potentially be tuned for improved
performance;
• The ability to drill down into the details of a query, view its text and history of resource utilization;
• Performance tuning annotations that show actions performed by SQL Azure Database Advisor
Azure SQL Database Query Performance
Insight
• A couple hours of data needs to be captured by Query Store for SQL Database to provide query
performance insights;
• If the database has no activity or Query Store was not active during a certain time period, the
charts will be empty when displaying that time period;
Extended events in SQL Database
Performance Guidance - Tiers
Basic
• You're just getting started with Azure SQL Database. Applications that are in development often don't
need high-performance levels. Basic databases are an ideal environment for database development, at
a low price point.
• You have a database with a single user. Applications that associate a single user with a database
typically don’t have high concurrency and performance requirements. These applications are
candidates for the Basic service tier.
Standard
• Your database has multiple concurrent requests. Applications that service more than one user at a
time usually need higher performance levels. For example, websites that get moderate traffic or
departmental applications that require more resources are good candidates for the Standard service
tier.
Performance Guidance - Tiers
Premium
• High peak load. An application that requires substantial CPU, memory, or input/output
(I/O) to complete its operations requires a dedicated, high-performance level;
• Many concurrent requests. Some database applications service many concurrent
requests, for example, when serving a website that has a high traffic volume;
• Low latency. Some applications need to guarantee a response from the database in
minimal time;
• Premium RS. Designed for customers that have IO-intensive workloads but do not require
the highest availability guarantees. Examples include testing high-performance workloads,
or an analytical workload where the database is not the system of record.
Performance Guidance - Maximum
concurrent logins
• You can analyze your user and application patterns to get an idea of the frequency of
logins;
• If multiple clients use the same connection string, the service authenticates each login;
• If 10 users simultaneously connect to a database by using the same username and
password, there would be 10 concurrent logins;
• This limit applies only to the duration of the login and authentication;
• If the same 10 users connect to the database sequentially, the number of concurrent
logins would never be greater than 1;
Performance Guidance -
sys.dm_db_resource_stats
• You can use the sys.dm_db_resource_stats view in every SQL database;
• The sys.dm_db_resource_stats view shows recent resource use data relative to
the service tier;
• Average percentages for CPU, data I/O, log writes, and memory are recorded
every 15 seconds and are maintained for 1 hour;
• Because this view provides a more granular look at resource use, use
sys.dm_db_resource_stats first for any current-state analysis or
troubleshooting;
Performance Guidance - sys.resource_stats
• The sys.resource_stats view in the master database has additional information
that can help you monitor the performance of your SQL database at its specific
service tier and performance level;
• The data is collected every 5 minutes and is maintained for approximately 14
days;
• This view is useful for a longer-term historical analysis of how your SQL database
uses resources;
Performance Guidance - Tune your
application
• Chatty applications make excessive data access operations that are
sensitive to network latency. You might need to modify these kinds
of applications to reduce the number of data access operations to
the SQL database.
Applications that have slow
performance because of
"chatty" behavior
• Databases that exceed the resources of the highest Premium
performance level might benefit from scaling out the workload
Databases with an intensive
workload that can't be
supported by an entire
single machine
Performance Guidance - Tune your
application
• Applications, especially those in the data access layer, that have poorly
tuned queries might not benefit from a higher performance level;
• This includes queries that lack a WHERE clause, have missing indexes, or
have outdated statistics. These applications benefit from standard query
performance-tuning techniques;
Applications that
have suboptimal
queries
• Applications that have inherent data access concurrency issues, for
example deadlocking, might not benefit from a higher performance level;
• Consider reducing round trips against the Azure SQL Database by caching
data on the client side with the Azure Caching service or another caching
technology;
Applications that
have suboptimal
data access design
Questions

Weitere ähnliche Inhalte

Was ist angesagt?

Sql server 2008 r2 perf and scale datasheet
Sql server 2008 r2 perf and scale   datasheetSql server 2008 r2 perf and scale   datasheet
Sql server 2008 r2 perf and scale datasheet
Klaudiia Jacome
 

Was ist angesagt? (20)

Everything you need to know about SQL Server 2016
Everything you need to know about SQL Server 2016Everything you need to know about SQL Server 2016
Everything you need to know about SQL Server 2016
 
SQL - Parallel Data Warehouse (PDW)
SQL - Parallel Data Warehouse (PDW)SQL - Parallel Data Warehouse (PDW)
SQL - Parallel Data Warehouse (PDW)
 
Sql 2016 - What's New
Sql 2016 - What's NewSql 2016 - What's New
Sql 2016 - What's New
 
Sql server 2016 new features
Sql server 2016 new featuresSql server 2016 new features
Sql server 2016 new features
 
SQL Server 2016 new features
SQL Server 2016 new featuresSQL Server 2016 new features
SQL Server 2016 new features
 
SQL Server 2016 Editions
SQL Server 2016 Editions SQL Server 2016 Editions
SQL Server 2016 Editions
 
Sql server 2008 r2 perf and scale datasheet
Sql server 2008 r2 perf and scale   datasheetSql server 2008 r2 perf and scale   datasheet
Sql server 2008 r2 perf and scale datasheet
 
A to z for sql azure databases
A to z for sql azure databasesA to z for sql azure databases
A to z for sql azure databases
 
SQLServer Database Structures
SQLServer Database Structures SQLServer Database Structures
SQLServer Database Structures
 
SQL server 2016 New Features
SQL server 2016 New FeaturesSQL server 2016 New Features
SQL server 2016 New Features
 
Store Data in Azure SQL Database
Store Data in Azure SQL DatabaseStore Data in Azure SQL Database
Store Data in Azure SQL Database
 
Getting Started with Azure SQL Database (Presented at Pittsburgh TechFest 2018)
Getting Started with Azure SQL Database (Presented at Pittsburgh TechFest 2018)Getting Started with Azure SQL Database (Presented at Pittsburgh TechFest 2018)
Getting Started with Azure SQL Database (Presented at Pittsburgh TechFest 2018)
 
SQL Server 2016 BI updates
SQL Server 2016 BI updatesSQL Server 2016 BI updates
SQL Server 2016 BI updates
 
The Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed InstanceThe Evolution of SQL Server as a Service - SQL Azure Managed Instance
The Evolution of SQL Server as a Service - SQL Azure Managed Instance
 
Keep your environment always on with sql server 2016 sql bits 2017
Keep your environment always on with sql server 2016 sql bits 2017Keep your environment always on with sql server 2016 sql bits 2017
Keep your environment always on with sql server 2016 sql bits 2017
 
Microsoft SQL Server 2016 - Everything Built In
Microsoft SQL Server 2016 - Everything Built InMicrosoft SQL Server 2016 - Everything Built In
Microsoft SQL Server 2016 - Everything Built In
 
Tarabica 2019 (Belgrade, Serbia) - SQL Server performance troubleshooting
Tarabica 2019 (Belgrade, Serbia) - SQL Server performance troubleshootingTarabica 2019 (Belgrade, Serbia) - SQL Server performance troubleshooting
Tarabica 2019 (Belgrade, Serbia) - SQL Server performance troubleshooting
 
SQL Server 2016 novelties
SQL Server 2016 noveltiesSQL Server 2016 novelties
SQL Server 2016 novelties
 
Exploring sql server 2016
Exploring sql server 2016Exploring sql server 2016
Exploring sql server 2016
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL Azure
 

Ähnlich wie Monitorando performance no Azure SQL Database

Data Warehouse Optimization
Data Warehouse OptimizationData Warehouse Optimization
Data Warehouse Optimization
Cloudera, Inc.
 
Azure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish KalamatiAzure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish Kalamati
Girish Kalamati
 

Ähnlich wie Monitorando performance no Azure SQL Database (20)

Tech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL DatabasesTech-Spark: Azure SQL Databases
Tech-Spark: Azure SQL Databases
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
AZURE Data Related Services
AZURE Data Related ServicesAZURE Data Related Services
AZURE Data Related Services
 
Moving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed InstanceMoving to the cloud; PaaS, IaaS or Managed Instance
Moving to the cloud; PaaS, IaaS or Managed Instance
 
Presentation cloud control enterprise manager 12c
Presentation   cloud control enterprise manager 12cPresentation   cloud control enterprise manager 12c
Presentation cloud control enterprise manager 12c
 
Migrate a successful transactional database to azure
Migrate a successful transactional database to azureMigrate a successful transactional database to azure
Migrate a successful transactional database to azure
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
 
Azure SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Database
 
Data Warehouse Optimization
Data Warehouse OptimizationData Warehouse Optimization
Data Warehouse Optimization
 
Understanding System Design and Architecture Blueprints of Efficiency
Understanding System Design and Architecture Blueprints of EfficiencyUnderstanding System Design and Architecture Blueprints of Efficiency
Understanding System Design and Architecture Blueprints of Efficiency
 
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
 
Intro to Azure Data Factory v1
Intro to Azure Data Factory v1Intro to Azure Data Factory v1
Intro to Azure Data Factory v1
 
Manageability Enhancements of SQL Server 2012
Manageability Enhancements of SQL Server 2012Manageability Enhancements of SQL Server 2012
Manageability Enhancements of SQL Server 2012
 
Oracle Enterprise Manager 12c: updates and upgrades.
Oracle Enterprise Manager 12c: updates and upgrades.Oracle Enterprise Manager 12c: updates and upgrades.
Oracle Enterprise Manager 12c: updates and upgrades.
 
Taming the shrew, Optimizing Power BI Options
Taming the shrew, Optimizing Power BI OptionsTaming the shrew, Optimizing Power BI Options
Taming the shrew, Optimizing Power BI Options
 
Azure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish KalamatiAzure from scratch part 3 By Girish Kalamati
Azure from scratch part 3 By Girish Kalamati
 
Choosing the Right Business Intelligence Tools for Your Data and Architectura...
Choosing the Right Business Intelligence Tools for Your Data and Architectura...Choosing the Right Business Intelligence Tools for Your Data and Architectura...
Choosing the Right Business Intelligence Tools for Your Data and Architectura...
 
Oracle
OracleOracle
Oracle
 
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New FeaturesRemote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New Features
 
Migrate SQL Workloads to Azure
Migrate SQL Workloads to AzureMigrate SQL Workloads to Azure
Migrate SQL Workloads to Azure
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Monitorando performance no Azure SQL Database

  • 1. WORKING WITH AZURE SQL DATABASE Performance and tuning guide
  • 2. • MVP Data Platform • Principal Database Architect at Vita Database Solutions • Pass Chapter Leader at SQLManiacs • SQL Server Database Consultant at Pythian • Vitor.fava@vitadbsolutions.com • http://vfava.wordpress.com • http://www.youtube.com/vitortff • https://groups.google.com/group/sqlmaniacs Vitor Fava
  • 3. What is SQL Database? • Relational database service in the cloud based on the market-leading Microsoft SQL Server engine, with mission- critical capabilities. • Delivers predictable performance, scalability with no downtime, business continuity and data protection—all with near-zero administration • Focus on rapid app development and accelerating your time to market, rather than managing virtual machines and infrastructure. • Because it’s based on the SQL Server engine, SQL Database supports existing SQL Server tools, libraries and APIs, which makes it easier for you to move and extend to the cloud.
  • 4. Monitor databases using the Azure portal • In the Azure portal, you can monitor a single database’s utilization by selecting your database and clicking the Monitoring chart; • This brings up a Metric window that you can change by clicking the Edit chart button and add the following metrics: • CPU percentage • DTU percentage • Data IO percentage • Database size percentage • You can also configure alerts on the performance metrics
  • 5. Monitor databases using DMVs • The same metrics that are exposed in the portal are also available through system views: sys.resource_stats in the logical master database of your server, and sys.dm_db_resource_stats in the user database; • Use sys.resource_stats if you need to monitor less granular data across a longer period of time; • Use sys.dm_db_resource_stats if you need to monitor more granular data within a smaller time frame;
  • 6. Monitor databases using DMVs SQL Database partially supports three categories of dynamic management views: • Database-related dynamic management views; • Execution-related dynamic management views; • Transaction-related dynamic management views;
  • 7. SQL Database Advisor • Azure SQL Database learns and adapts with your application and provides customized recommendations enabling you to maximize the performance of your SQL databases; • The SQL Database Advisor provides recommendations for creating and dropping indexes, parameterizing queries, and fixing schema issues; • The advisor assesses performance by analyzing your SQL database's usage history; • The recommendations that are best suited for running your database’s typical workload are recommended;
  • 8. SQL Database Advisor • Create Index recommendations appear when the SQL Database service detects a missing index that if created, can benefit your databases workload (non-clustered indexes only); • Drop Index recommendations appear when the SQL Database service detects duplicate indexes (currently in preview and applies to duplicate indexes only); • Parameterize queries recommendations appear when you have one or more queries that are constantly being recompiled but end up with the same query execution plan. This condition opens up an opportunity to apply forced parameterization, which will allow query plans to be cached and reused in the future improving performance and reducing resource usage;
  • 9. SQL Database Advisor • Fix schema issues recommendations appear when the SQL Database service notices an anomaly in the number of schema-related SQL errors happening on your Azure SQL Database. • This recommendation typically appears when your database encounters multiple schema-related errors (invalid column name, invalid object name, etc.) within an hour. SQL Error Code Message 201 Procedure or function '' expects parameter '', which was not supplied. 207 Invalid column name '*'. 208 Invalid object name '*'. 213 Column name or number of supplied values does not match table definition. 2812 Could not find stored procedure '*'. 8144 Procedure or function * has too many arguments specified.
  • 10. Azure SQL Database Query Performance Insight • Managing and tuning the performance of relational databases is a challenging task that requires significant expertise and time investment; • Query Performance Insight allows you to spend less time troubleshooting database performance by providing the following: • Deeper insight into your databases resource (DTU) consumption; • The top queries by CPU/Duration/Execution count, which can potentially be tuned for improved performance; • The ability to drill down into the details of a query, view its text and history of resource utilization; • Performance tuning annotations that show actions performed by SQL Azure Database Advisor
  • 11. Azure SQL Database Query Performance Insight • A couple hours of data needs to be captured by Query Store for SQL Database to provide query performance insights; • If the database has no activity or Query Store was not active during a certain time period, the charts will be empty when displaying that time period;
  • 12. Extended events in SQL Database
  • 13. Performance Guidance - Tiers Basic • You're just getting started with Azure SQL Database. Applications that are in development often don't need high-performance levels. Basic databases are an ideal environment for database development, at a low price point. • You have a database with a single user. Applications that associate a single user with a database typically don’t have high concurrency and performance requirements. These applications are candidates for the Basic service tier. Standard • Your database has multiple concurrent requests. Applications that service more than one user at a time usually need higher performance levels. For example, websites that get moderate traffic or departmental applications that require more resources are good candidates for the Standard service tier.
  • 14. Performance Guidance - Tiers Premium • High peak load. An application that requires substantial CPU, memory, or input/output (I/O) to complete its operations requires a dedicated, high-performance level; • Many concurrent requests. Some database applications service many concurrent requests, for example, when serving a website that has a high traffic volume; • Low latency. Some applications need to guarantee a response from the database in minimal time; • Premium RS. Designed for customers that have IO-intensive workloads but do not require the highest availability guarantees. Examples include testing high-performance workloads, or an analytical workload where the database is not the system of record.
  • 15. Performance Guidance - Maximum concurrent logins • You can analyze your user and application patterns to get an idea of the frequency of logins; • If multiple clients use the same connection string, the service authenticates each login; • If 10 users simultaneously connect to a database by using the same username and password, there would be 10 concurrent logins; • This limit applies only to the duration of the login and authentication; • If the same 10 users connect to the database sequentially, the number of concurrent logins would never be greater than 1;
  • 16. Performance Guidance - sys.dm_db_resource_stats • You can use the sys.dm_db_resource_stats view in every SQL database; • The sys.dm_db_resource_stats view shows recent resource use data relative to the service tier; • Average percentages for CPU, data I/O, log writes, and memory are recorded every 15 seconds and are maintained for 1 hour; • Because this view provides a more granular look at resource use, use sys.dm_db_resource_stats first for any current-state analysis or troubleshooting;
  • 17. Performance Guidance - sys.resource_stats • The sys.resource_stats view in the master database has additional information that can help you monitor the performance of your SQL database at its specific service tier and performance level; • The data is collected every 5 minutes and is maintained for approximately 14 days; • This view is useful for a longer-term historical analysis of how your SQL database uses resources;
  • 18. Performance Guidance - Tune your application • Chatty applications make excessive data access operations that are sensitive to network latency. You might need to modify these kinds of applications to reduce the number of data access operations to the SQL database. Applications that have slow performance because of "chatty" behavior • Databases that exceed the resources of the highest Premium performance level might benefit from scaling out the workload Databases with an intensive workload that can't be supported by an entire single machine
  • 19. Performance Guidance - Tune your application • Applications, especially those in the data access layer, that have poorly tuned queries might not benefit from a higher performance level; • This includes queries that lack a WHERE clause, have missing indexes, or have outdated statistics. These applications benefit from standard query performance-tuning techniques; Applications that have suboptimal queries • Applications that have inherent data access concurrency issues, for example deadlocking, might not benefit from a higher performance level; • Consider reducing round trips against the Azure SQL Database by caching data on the client side with the Azure Caching service or another caching technology; Applications that have suboptimal data access design

Hinweis der Redaktion

  1. Course ####y