At a Glance; Contents; About the Author; About the Technical Reviewers; Acknowledgments; Introduction; Part I: Tables and Indexes; Chapter 1: Data Storage Internals; Database Files and Filegroups; Data Pages and Data Rows; Large Objects Storage; Row-Overflow Storage; LOB Storage; SELECT * and I/O; Extents and Allocation Map Pages; Data Modifications; Much Ado about Data Row Size; Table Alteration; Summary; Chapter 2: Tables and Indexes: Internal Structure and Access Methods; Heap Tables; Clustered Indexes; Composite Indexes; Nonclustered Indexes; Summary; Chapter 3: Statistics
Chapter 4: Special Indexing and Storage FeaturesIndexes with Included Columns; Filtered Indexes; Filtered Statistics; Calculated Columns; Data Compression; Row Compression; Page Compression; Performance Considerations; Sparse Columns; Summary; Chapter 5: SQL Server 2016 Features; Temporal Tables; Stretch Databases; Configuring Stretch Database; Querying Stretch Databases; Stretch Database Pricing; Row-Level Security; Performance Impact; Blocking Modifications; Always Encrypted; Always Encrypted Overview; Programmability; Security Considerations and Key Management; Dynamic Data Masking
Introduction to SQL Server StatisticsColumn-Level Statistics; Statistics and Execution Plans; Statistics and Query Memory Grants; Statistics Maintenance; New Cardinality Estimator (SQL Server 2014-2016); Comparing Cardinality Estimators: Up-to-Date Statistics; Comparing Cardinality Estimators: Outdated Statistics; Comparing Cardinality Estimators: Indexes with Ever-Increasing Key Values; Comparing Cardinality Estimators: Joins; Comparing Cardinality Estimators: Multiple Predicates; Choosing the Model; Query Optimizer Hotfixes and Trace Flag T4199; Summary
Part II: Other Things That MatterChapter 8: Constraints; Primary Key Constraints; Unique Constraints; Foreign Key Constraints; Check Constraints; Wrapping Up; Summary; Chapter 9: Triggers; DML Triggers; DDL Triggers; Logon Triggers; UPDATE() and COLUMNS_UPDATED() Functions; Nested and Recursive Triggers; First and Last Triggers; CONTEXT_INFO and SESSION_CONTEXT; Summary; Chapter 10: Views; Views; Indexed (Materialized) Views; Partitioned Views; Updatable Views; Summary; Chapter 11: User-Defined Functions; Much Ado About Code Reuse; Multi-Statement Functions; Inline Table-Valued Functions
Performance and Security ConsiderationsCombining Security Features; Summary; Chapter 6: Index Fragmentation; Types of Fragmentation; FILLFACTOR and PAD_INDEX; Index Maintenance; Designing an Index Maintenance Strategy; Patterns That Increase Fragmentation; Summary; Chapter 7: Designing and Tuning the Indexes; Clustered Index Design Considerations; Identities, Sequences, and Uniqueidentifiers; Nonclustered Index Design Considerations; Optimizing and Tuning Indexes; Detecting Unused and Inefficient Indexes; Index Consolidation; Detecting Suboptimal Queries; Summary
0
8
8
8
8
Improve your ability to develop, manage, and troubleshoot SQL Server solutions by learning how different components work "under the hood," and how they communicate with each other. The detailed knowledge helps in implementing and maintaining high-throughput databases critical to your business and its customers. You'll learn how to identify the root cause of each problem and understand how different design and implementation decisions affect performance of your systems. New in this second edition is coverage of SQL Server 2016 Internals, including In-Memory OLTP, columnstore enhancements, Operational Analytics support, Query Store, JSON, temporal tables, stretch databases, security features, and other improvements in the new SQL Server version. The knowledge also can be applied to Microsoft Azure SQL Databases that share the same code with SQL Server 2016. Pro SQL Server Internals is a book for developers and database administrators, and it covers multiple SQL Server versions starting with SQL Server 2005 and going all the way up to the recently released SQL Server 2016. The book provides a solid road map for understanding the depth and power of the SQL Server database server and teaches how to get the most from the platform and keep your databases running at the level needed to support your business. The book: " Provides detailed knowledge of new SQL Server 2016 features and enhancements " Includes revamped coverage of columnstore indexes and In-Memory OLTP " Covers indexing and transaction strategies " Shows how various database objects and technologies are implemented internally, and when they should or should not be used " Demonstrates how SQL Server executes queries and works with data and transaction log What You Will Learn Design and develop database solutions with SQL Server. Troubleshoot design, concurrency, and performance issues. Choose the right database objects and technologies for the job. Reduce costs and improve availability and manageability. Design disaster recovery and high-availability strategies. Improve performance of OLTP and data warehouse systems through in-memory OLTP and Columnstore indexes. Who This Book Is For Developers and database administrators who want to design, develop, and maintain systems in a way that gets the most from SQL Server. This book is an excellent choice for people who prefer to understand and fix the root cause of a problem rather than applying a 'band aid' to it