Advanced Database Topics

Slides:



Advertisements
Similar presentations
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Advertisements

1 NETE4631 Cloud deployment models and migration Lecture Notes #4.
w/ Service Provider Foundation & Service Management Automation VMs, Networks, Automation Service Bus Database SQL Sever MySQL Web Sites Services Plans.
The Essentials: DMV’s and T-SQL for the DBA Rocky Mountain Tech Tri-Fecta.
Concepts of Database Management Sixth Edition
Architecting a Large-Scale Data Warehouse with SQL Server 2005 Mark Morton Senior Technical Consultant IT Training Solutions DAT313.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
Understanding and Managing WebSphere V5
Manage & Configure SQL Database on the Cloud Haishi Bai Technical Evangelist Microsoft.
A Brief Overview by Aditya Dutt March 18 th ’ Aditya Inc.
Cloud Computing for the Enterprise November 18th, This work is licensed under a Creative Commons.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Database Design for DNN Developers Sebastian Leupold.
Module 8 Improving Performance through Nonclustered Indexes.
Chapter 4 The Relational Model 3: Advanced Topics Concepts of Database Management Seventh Edition.
Introduction to Cloud Computing
Cloud Computing & Amazon Web Services – EC2 Arpita Patel Software Engineer.
Module 7 Reading SQL Server® 2008 R2 Execution Plans.
Windows Azure Conference 2014 Deploy your Java workloads on Windows Azure.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns.
T-SQL: Simple Changes That Go a Long Way DAVE ingeniousSQL.com linkedin.com/in/ingenioussql.
1 Biometric Databases. 2 Overview Problems associated with Biometric databases Some practical solutions Some existing DBMS.
Developer Day Windows Azure June 2012 & October 2012 News Mario Szpuszta Cloud Architect & Technical Evangelist, Microsoft Corp.
Session 1 Module 1: Introduction to Data Integrity
Launch Amazon Instance. Amazon EC2 Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity in the Amazon Web Services (AWS) cloud.
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
MGT305 - Application Management in Private and Public Clouds Daniel Savage Microsoft Corporation MGT305 Kenan Owens Microsoft Corporation.
Execution Plans Detail From Zero to Hero İsmail Adar.
 Cloud Computing technology basics Platform Evolution Advantages  Microsoft Windows Azure technology basics Windows Azure – A Lap around the platform.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
© 2015 MetricStream, Inc. All Rights Reserved. AWS server provisioning © 2015 MetricStream, Inc. All Rights Reserved. By, Srikanth K & Rohit.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
Understanding Core Database Concepts Lesson 1. Objectives.
Review DirectQuery in SSAS 2016, best practices and use cases
Understanding and Improving Server Performance
Scalable Web Apps Target this solution to brand leaders responsible for customer engagement and roll-out of global marketing campaigns. Implement scenarios.
Troubleshooting SQL Server high CPU usage
Windows Azure SQL Federation
SQL Server Data Collector From Every Angle
SQL Server Query and Index Tuning
Lead SQL BankofAmerica Blog: SQLHarry.com
T-SQL: Simple Changes That Go a Long Way
Example of a page header
Planning an Effective Upgrade from SQL Server 2008
SQL Server Monitoring Overview
Power BI Security Best Practices
Windows Azure Migrating SQL Server Workloads
Scalable Web Apps Target this solution to brand leaders responsible for customer engagement and roll-out of global marketing campaigns. Implement scenarios.
Database Testing in Azure Cloud
Microsoft Dumps Question Answer - Dumps4download
Fast Start for Microsoft Azure – SQL Server IaaS Workshop
02 | Design and implement database
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Purpose, Pitfalls and Performance Implications
Cloudy with a Chance of Data
Getting To Know Your Indexes
Introduction to partitioning
Purpose, Pitfalls and Performance Implications
Outline Virtualization Cloud Computing Microsoft Azure Platform
Microsoft SQL Server 2014 for Oracle DBAs Module 7
Dynamic Management Views a practical overview!
Dynamic Management Views a practical overview!
MS AZURE By Sauras Pandey.
Jean Joseph DBA/Developer
Understanding Core Database Concepts
Just Enough SSIS Scripting to be Dangerous.
The Database World of Azure
Presentation transcript:

Advanced Database Topics Dave Valentine dkValz@comcast.net www.ingenioussql.com

Agenda System Catalog Views Dynamic Management Views Extended Events Index Maintenance Database Partitioning AWS and AZURE Databases Performance Tuning

About Dave MCP MCSA: SQL Server 2012 Database Architect / Database Developer Adjunct Professor @IngeniousSQL dkValz@comcast.net IngeniousSQL.com

System Catalog View (Objects) Catalog of metadata that describes database structures Database discovery Schema comparison Development and deployment Common Object Catalog Views sys.objects sys.tables sys.columns sys.procedures sys.indexes https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/catalog-views-transact-sql https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/object-catalog-views-transact-sq

Dynamic Management View Dynamic management views and functions return server state information that can be used to monitor the health of a server instance, diagnose problems, and tune performance. Dynamic Management View Grouping sys.dm_exec… Execution and Connection Information sys.dm_os… Operating System Information sys.dm_tran… Transaction Information sys.dm_db… Database Information sys.dm_xe… Extended Event Information Useful DMV’s sys.dm_exec_cached_plans Cached Query Plans sys.dm_exec_sql_text Gets the SQL Query Text sys.dm_exec_query_plan Gets Query Plans sys.dm_exec_sessions Active Sessions in SQL Server sys.dm_db_index_usage_stats Index Details https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/system-dynamic-management-views

Cached Query Plans DMV Returns a row for each query plan that is cached by SQL Server for faster query execution. You can use this dynamic management view to find cached query plans, cached query text, the amount of memory taken by cached plans, and the reuse count of the cached plans. select * from sys.dm_exec_cached_plans https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management- views/sys-dm-exec-cached-plans-transact-sql

SQL Query Text DMF Returns the text of the SQL batch that is identified by the specified sql_handle/plan handle. The sql_handle can be obtained from dynamic management objects such as : sys.dm_exec_query_stats sys.dm_exec_connections The plan_handle can be obtained from dynamic management objects: sys.dm_exec_cached_plans sys.dm_exec_procedure_stats sys.dm_exec_trigger_stats select * from sys.dm_exec_sql_text(0x06000600570C3715B0FCDF49080000000100000… https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-sql-text-transact-sql

SQL Profiler Deprecated Feature Performance Client vs Server Side Extended Events https://docs.microsoft.com/en-us/sql/tools/sql-server-profiler/sql-server-profiler

Extended Events Light weight monitoring system that uses very few system recourses Evolving Tool Windows Events SQL Server Events Templates Events Event Fields Target Types (Data Storage) Ring Buffer Event File Others (Histogram, Event Counter, Pair Matching) https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/extended-events https://docs.microsoft.com/en-us/sql/relational-databases/extended-events/quick-start-extended-events-in-sql-server

Indexing Heaps Indexes CLUSTERED NONCLUSTERED Covering Filtered Physical order of a table NONCLUSTERED Another order of the table with specified columns Covering Including all columns needed to satisfy a query Filtered Includes data that meets a specified predicate

Indexing Continued Index Types XML Indexes specifically for XML columns Clustered Index must be defined Primary Index – Stores all node values, types and paths Similar to Clustered Index Large Index Secondary Index Primary XML Index has to be defined Path – the structure Value – the values Property – Includes base table’s primary key, path, and values.

Indexing Continued Index Types Column Store Converts the traditional row based storage into column segments Smaller Footprint Not Updateable in 2012 Clustered Columns Store Updatable in 2014 Non-Clustered Updateable in SQL Server 2016

Row Based Index Column Store 8K Page 8K Page

Column Store Index Column Store Segments 8K Page 8K Page 8K Page

Indexing Maintenance When to add update remove index Performance implications Index DMV’s dm_db_index_usage_stats dm_db_missing_index_details dm_db_missing_index_groups dm_db_missing_index_group_stats Brent Ozar’s Index Blitz https://www.brentozar.com/blitzindex/

Database Partitioning Performance Partition function Single Column Data type Range Right or Left (inclusive) Range Right suggested for dates File Groups Database Files Partition Scheme maps data from table to the file groups via partition function Order of file groups specify where data is loaded Create or alter table (on partition scheme)

Database Partitioning Switch in Identical Schemas Additional Constraints Required Existing Constraints must be implemented

IaaS Databases Infrastructure as a Service Similar to Virtual Machines Provider Manages Hardware Operating System Existing Application Development Pros Full Control Cloud Computing Benefits Customization Integration with existing infrastructure Cons BYOL (Bring Your Own License) Total Cost of Ownership Manage Server SQL Server Installation

PaaS Databases Platform as a Service Provider Manages Hardware Provider Manages Operating System Provider Manages Database Server Internals New App development Pros SQL Server License included in Cost Scaling Up and Down Less IT Support, DBA’s Application Development Speed Cons Control Cost Functionality Configuration

Azure SQL Databases Microsoft Technology DTU (Data Transaction Unit) CPU, Memory, Reads, Writes https://azure.microsoft.com/en-us/pricing/calculator/ Elastic Queries Authentication SSIS, MDS, DQS Separate Database Connections Troubleshooting and Server Level DMVs Network IP Ranges Elastic Database Jobs

AWS RDS Database Amazon Web Service Technology Size Based Pricing Model https://aws.amazon.com/rds/sqlserver/pricing/ Authentication RDS Server Based SSAS, SSIS, DQS, MDS Limitation Number of Database Troubleshooting and Server Level DMVs SQL Agent

Summary System Catalog Views Dynamic Management Views Extended Events Deadlocks Indexing Index Utilization Database Partitioning SWITCH IN AWS and AZURE Databases

Questions Dave Valentine @ingeniousSQL ingeniousSQL.com linkedin.com/in/ingenioussql