SQL Server: Why Physical Database Design Matters
This course shows how you to choose the right data types applicable to SQL Server developers and anyone who is responsible for designing and creating SQL Server tables and indexes, from SQL Server 2005 onward
What you'll learn
This course is about how your database’s physical design either takes advantage of or is hindered by the way that the SQL Server platform works; knowing this can give you better long-term scalability, availability, and performance. Choosing the right data types when you're designing your columns, tables, and indexes is really critical. Using the wrong data type can cause more space to be required, affecting data density in memory, database and backup size, transaction log efficiency, and more. It's even more important when you're choosing your clustering keys, as the wrong choice there can cause nonclustered index sizes to balloon dramatically. It can even affect the performance of queries, when incompatible data types are used in comparisons and cause very costly operations to take place. This course will show you how to make the right choices and avoid all of these problems. It starts by explaining the various data structures that are used to store columns and rows, and how they can be affected by data type choice. Then it shows how data type choice factors into clustered and nonclustered index key choice. Finally it describes the implicit conversion and probe residual problems that can occur from mismatched data types used in queries. Packed with a wealth of information and practical, easy-to-follow demonstrations, this course will show you how to make the RIGHT choices to make sure you avoid all these common problems. The course is applicable for all SQL Server versions from SQL Server 2005 onward, and for SQL Server developers and anyone responsible for designing and creating SQL Server tables and indexes, with any level of experience.
Table of contents
- Introduction 5m
- It is Not Just About That Single Column Value 3m
- Use Common Sense: Do Not Take it Too Far... 3m
- Column Size and Number of Columns 2m
- Understanding Rows, Pages, and Storage 3m
- Data Storage Structure: IN_ROW_DATA 4m
- Data Storage Structure: ROW_OVERFLOW_DATA 4m
- Data Storage Structure: LOB_DATA 4m
- Record Structure 5m
- Demo: Analyzing Table Structures 9m
- Demo: Secondary Errors - Insert Error from Poor Column Choice 4m
- Record Structure: Key Points (1) 2m
- Record Structure: Key Points (2) 3m
- Vertical Partitioning (Limited LOB And LOB) 3m
- Vertical Partitioning: Customer Table 5m
- Vertical Partitioning Strategies 2m
- Record Structure and Compression 3m
- Summary: Column Size and Row Size Matter! 2m
- Introduction 2m
- What Structures Exist for A Table? 4m
- What About Columnstore Indexes? 2m
- Table Structure: Heap 2m
- Demo: Analyzing Heap Structures - Setup 4m
- Demo: Analyzing Heap Structures 8m
- Table Structure: Clustered Table 3m
- Demo: Analyzing Clustered Table Structures - Setup 4m
- Demo: Analyzing Clustered Table Structures - Part I 7m
- Demo: Setup sp_SQLskills_SQL2012_helpindex 4m
- Demo: Analyzing Clustered Table Structures - Part 2 3m
- Accessing Data Using A Clustered Index 3m
- Nonclustered Indexes: The Book Analogy 2m
- Accessing Data Using A Nonclustered Index 3m
- Clustering Key Usage In Nonclustered Indexes 6m
- Demo: Analyzing Nonclustered Index Structures 7m
- Clustering Key Widens Nonclustered Indexes 3m
- Nonclustered Index Overhead 3m
- Is it Really that Much Space? 4m
- Clustered Index Criteria 6m
- Choose A GOOD Clustering Key 6m
- Primary Key Does NOT Have to be The Clustering Key 2m
- Scenario: What is The Real Cost? 2m
- Scenario: What is In That Key? 3m
- Scenario: What is The Total Cost? 2m
- Demo: Analyzing AdventureWorksDW2012.dbo.FactInternetSales 11m
- Summary: The Effect of Data Type Choice 2m
- Introduction 3m
- Implicit Conversions 3m
- Demo: Implicit Conversions 7m
- More on Implicit Conversions 1m
- Demo: Finding Implicit Conversions in The Plan Cache 2m
- Probe Residual 3m
- Demo: Probe Residual 8m
- Demo: Finding Probe Residual in The Plan Cache 4m
- Summary: Inconsistencies in Data Types 2m
- Just The Tip of The Iceberg 2m
- Where to go Next? 2m
- Course Summary 2m