460 likes | 591 Views
Performance Tuning Microsoft Azure SQL Database. Eric D. Boyd Founder & CEO, responsiveX Microsoft Azure MVP, Insider & Advisor. About Eric D. Boyd. @ EricDBoyd EricDBoyd.com. Founder/CEO Microsoft Azure MVP Speaker & Author. Agenda. Understanding SQL Database Architecture
E N D
Performance Tuning Microsoft Azure SQL Database • Eric D. Boyd • Founder & CEO, responsiveX • Microsoft Azure MVP, Insider & Advisor
About Eric D. Boyd @EricDBoyd EricDBoyd.com Founder/CEO Microsoft Azure MVP Speaker & Author
Agenda Understanding SQL Database Architecture Managing Connections Monitoring Performance Scaling SQL Database Get Started with new Service Tiers
Understanding SQL Database Architecture Experience, Capabilities, Characteristics
Azure SQL DB is like SQL Server • Same TDS protocol as SQL Server • Same port (1433) as SQL Server • Same tools as SQL Server • SQL Server Management Studio • Visual Studio • Third-Party Tools • Same T-SQL as SQL Server
Azure SQL DB is resilient Up to 99.99% Service Level Agreement Databases are replicated on three servers Databases can be geo-replicated to other data centers Azure manages the underlying infrastructure for you
Azure SQL DB is scalable You can scale up resources for better performance You can scale out across multiple databases You can architect solutions with a mix of scale up and scale out to efficiently meet your needs
Azure SQL DB is multi-tenant Customers share physical resources This enables you to save money when you don’t need all of the physical resources
Multi-Tenant Services Are Tricky Take What You Can Get Policed Resources Dedicated Resources
Web & Business Edition Take What You Can Get + Policed Resources Editions are not based on performance, but based on database size Unpredictable performance Terminated connections
Getting Back to the Basics Open connections late, close early Pool connections Limit the size and shape of the data Tune queries
Managing Connections • Connections can be terminated when: • Hardware failures or server balancing occurs • You consume too many resources, too quickly • You take to long to do what you need to do • You should retry when a connection termination is a transient fault and temporary
Is It Transient? http://msdn.microsoft.com/library/azure/dn338079.aspx
Don’t Reinvent The Wheel • Recent versions of ADO.NET provides retry capability • SqlAzureExecutionStrategy
Don’t Reinvent The Wheel • Recent versions of ADO.NET provides retry capability • SqlAzureExecutionStrategy • Microsoft Azure CAT and Patterns & Practices (P&P) created the Transient Fault Handling Application Block
Monitoring SQL Database • Connections • sys.database_connection_stats – database connections • sys.event_log – connectivity events
Connection Events DEMO
Monitoring SQL Database • Dynamic Management Objects – views and functions • Monitor and Manage: • Database – indexes, partitions and waits • Execution – connections, sessions, requests • Transaction – transactions and locks
Scaling SQL Database • Scale Up • Web & Business allow you to scale up storage • New Service Tiers enable you to scale up performance • Scale Out • Partitioning and sharding enable you to scale out without limits
Partition By Function Customer Catalog Order Vendor
Sharding CustomerShard01 Customer CustomerShard02 Shard Map
Additional Resources • Cloud Service Fundamentals • http://code.msdn.microsoft.com/windowsazure/Cloud-Service-Fundamentals-4ca72649
New Performance Based Editions SQL Database Service Tiers and Performance Levels
New Service Tiers DEMO
More SQL Database? – Get the Book • Get Started • Setup and Configuration • Migration • Security • Backup • Reporting • Performance • Scalability • Monitoring • Management
Summary SQL Database is familiar, resilient and scalable You need to consider fundamentals like connection management and query optimization when building applications using SQL DB New Service Tiers provide consistent and predicable performance
Questions? Eric D. Boyd Founder + CEO, responsiveX Microsoft Azure MVP, Insider & Advisor eric@responsiveX.com www.EricDBoyd.com @EricDBoyd