Help! My table is getting too big! How to divide and conquer SQL Relay 2014.

Slides:



Advertisements
Similar presentations
Big Data Working with Terabytes in SQL Server Andrew Novick
Advertisements

Amazon RDS (MySQL and Oracle) and SQL Azure Emil Tabakov Telerik Software Academy academy.telerik.com.
A Fast Growing Market. Interesting New Players Lyzasoft.
Tables Lesson 6. Skills Matrix Tables Tables store data. Tables are relational –They store data organized as row and columns. –Data can be retrieved.
© 2008 Kroll Ontrack Inc.| Ontrack PowerControls 5.1 The ultimate “power tool” for SharePoint administrators.
Microsoft Dynamics AX Technical Conference 2013
Utility Database Chris
© 2009 Kroll Ontrack Inc.| Ontrack PowerControls 6.0 for SharePoint™ A Better Way to Search and Restore.
Russ Houberg Senior Technical Architect, MCM KnowledgeLake, Inc.
Module 8: Designing Active Directory Disaster Recovery in Windows Server 2008.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Exam QUESTION CertKiller.com has hired you as a database administrator for their network. Your duties include administering the SQL Server 2008.
1 MS SQL Server 7.0 Project Demo by: Amritaputra Bhattacharya Avik Sarkar Kaushik Das Srijit Maiti.
FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.
How a little code can help with support.. Chris Barba – Developer at Cimarex Energy Blog:
1 © Prentice Hall, 2002 Physical Database Design Dr. Bijoy Bordoloi.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
Data: Migrating, Distributing and Audit Tracking Michelle Ayers, Advisory Solution Consultant
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
Oracle Challenges Parallelism Limitations Parallelism is the ability for a single query to be run across multiple processors or servers. Large queries.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
Replication March 16, Replication What is Replication?  A technique for increasing availability, fault tolerance and sometimes, performance 
Performance Dash A free tool from Microsoft that provides some quick real time information about the status of your SQL Servers.
Page 1 SQL Server Myths XV ENCONTRO DA COMUNIDADE SQLPORT Rui Ribeiro MCITP 2011/08/16.
Partitioning Design For Performance and Maintainability Martin Cairns
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
SQL Server 2005 Implementation and Maintenance Chapter 12: Achieving High Availability Through Replication.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
7 Strategies for Extracting, Transforming, and Loading.
Alwayson Availability Groups
Chapter 5 Index and Clustering
ORACLE & VLDB Nilo Segura IT/DB - CERN. VLDB The real world is in the Tb range (British Telecom - 80Tb using Sun+Oracle) Data consolidated from different.
Technology Drill Down: Windows Azure Platform Eric Nelson | ISV Application Architect | Microsoft UK |
SSMS SQL Server Management System. SQL Server Microsoft SQL Server is a Relational Database Management System (RDBMS) Relational Database Management System.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Database Growth: Problems & Solutions.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
LAYERED PARTITIONING Josip Šaban, Hypo Alpe Adria AG, Klagenfurt.
SQL SERVER MAINTENANCE PLANS Kat
How to kill SQL Server Performance Håkan Winther.
Strategies for Working with Texas-sized Databases Robert L Davis Database Engineer
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP,MCP. SQL SERVER Database Administration.
SQL Server 2016 – New Features Tilahun Endihnew March 12, 2016.
BIG DATA/ Hadoop Interview Questions.
You Inherited a Database Now What? What you should immediately check and start monitoring for. Tim Radney, Senior DBA for a top 40 US Bank President of.
Aaron Stanley King. What is SQL Azure? “SQL Azure is a scalable and cost-effective on- demand data storage and query processing service. SQL Azure is.
Doing fast! Optimizing Query performance with ColumnStore Indexes in SQL Server 2012 Margarita Naumova | SQL Master Academy.
Presented by: Aaron Stanley King.  Benefits of SQL Azure  Features of SQL Azure  Demos, Demos, Demos!  How to query in SQL Azure  More Demos!  Recent.
Database Design: Solving Problems Before they Start! Ed Pollack Database Administrator CommerceHub.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
KEEPS – a system for UELMA preservation and security
Introduction to Partitioning in SQL Server
Answer to Summary Questions
You Inherited a Database Now What?
SQL Replication for RCSQL 4.5
Curacao SQL Saturday June 11, 2016
Antonio Abalos Castillo
100% Exam Passing Guarantee & Money Back Assurance
Upgrading to Microsoft SQL Server 2014
SQL Server May Let You Do It, But it Doesn’t Mean You Should
Working with Very Large Tables Like a Pro in SQL Server 2014
Data Lifecycle Review and Outlook
20 Questions with Azure SQL Data Warehouse
In Memory OLTP Not Just for OLTP.
PowerShell & PowerBi Reducing DBAs Context Switching
PowerShell & PowerBi Reducing DBAs Context Switching
You Inherited a Database Now What?
Professional Services Tools Library (PSTL)
Presentation transcript:

Help! My table is getting too big! How to divide and conquer SQL Relay 2014

About me…

So what is too big where tables are concerned? SQL Server can store Multi-TB tables, so the answer is always contextual Big enough to cause performance issues (on the current hardware) Big enough to cause maintenance operations to take too long or simply not be practical at all (on the current hardware) Big due to containing large amounts of historic / “processed” / “completed" data (mainly in an OLTP system)

So what options do I have? Option 1: Do nothing (the told you so/job gamble option) Option 2: Upgrade the hardware (the sticky plaster option) Option 3: If no extra disk space is available (the bail out option): Delete the older portion of the data Move the older portion of the data to Windows SQL Database (Azure) Option 4: If disk space is available (the scale out option): Partition the data Distributed partitioned views Partitioned views Partitioning (Enterprise only)

Option 1: Do nothing (told you so/job gamble option) “I told them we needed a hardware upgrade and more disk space. Told them loads of times. Well, let’s wait for it to blow, teach them to ignore me.” “What? Fired? It wasn’t my fault! I asked….” “Yes, I was the DBA at XYZ when it all went wrong. Oh, the positions been taken? Sure, I understand.”

Option 2: Upgrade the hardware (sticky plaster option) A perfectly valid option is some circumstances: A third party database that you can’t change No resource or time to implement any other solution Expensive and with most current procurement processes, not quick

Option 3: If no extra disk space is available (bail out option) Delete the older portion of the data Pretty much a last resort but you may not be contractually obliged to keep the data anymore Ensure you have multiple good (restore-tested) backups Move the older portion of the data to Windows SQL Database (Azure) Actually a very sensible idea in this circumstance Procure multiple databases and transfer the data up to them (now up to 500GB each) Triple-replicated and auto-backed up, so the data is safe

Option 4: If disk space is available (scale out option) Partition the data (Partitioned Views) Distributed partitioned views Data archived from the main table to a table in an archived database Cross-database view (UNION) used to combine the data back into one set Distributed transactions come into play Partitioned views Data from the main table partitioned across one or more tables in the same database View (UNION) used to combine the data back into one set With proper trusted constraints, partition elimination is achievable Excellent in conjunction with multiple file groups (some read, some read-only)

Option 4: If disk space is available (scale out option) Cont. Partition the data (Partitioning) Partitioning (Enterprise only) Data from the main table partitioned across one or more partitions in the same database Partitioning key should ideally be in the PK In SQL Server 2014, maintenance at the partition level!

Partitioned Views Vs. Partitioning Partitioned Views Any Version Partition elimination Different indexes per “partition” Replication friendly (all types) “Easy” feature High IO during “partitioning” Can support multiple constraints on multiple columns Partitioning Enterprise only Partition elimination Same indexes for all partitions Replication friendly (transactional) “Complex” feature Designed specifically to ease the pain of moving in and out large volumes of data Partitioned on a single column

A Standard Table…

Partitioned Views…

Partitioning…

Partitioned Views and Partitioning…

Choosing a Partitioning Column Should reflect the best way to subdivide the target table and get a balanced distribution of data Used as a filter in most of the queries run against the table, otherwise you will not get the benefit of any partition elimination (accessing only the partitions needed as opposed to the whole table) Good candidates: Date time columns: order date, inserted date, etc. Countries: customer country

Stop! Demo time. Implementing Partitioned Views Implementing Partitioning Quick performance test (Partitioned Views vs. Partitioning)