SQL Server 2008: What to do and What not to do Eladio Rincón Javier Loria Solid Quality Mentors
Agenda
SalesOrderIDStatusSalesOrderNumberCustomerIDAccountNumberSubTotal SO SO SO SO SO SO SO SO SO SO SO SO SO SO SO Row Data Compression 3 © 2008 Solid Quality Mentors SO SO Fixed length data types are physically rearranged as variable data types
Page Data Compression: (1/3) SO SO SO SO SO SO SO SO SO SO SO SO SO SO SO SalesOrderIDStatusSalesOrderNumberCustomerIDAccountNumberSubTotal Page data compression begins with row data compression
Page Data Compression: (2/3) {1-3}595SO {5} {1} {5} {1} {5} {1} {5} {1}35 510{5} {1}45 397{5} {1}55 146{5} {1}65 511{5} {1}75 646{5} {1}85 514{5} {1}95 578{5} {2}05 504{5} {2}15 200{5} SalesOrderIDStatusSalesOrderNumberCustomerIDAccountNumberSubTotal {1}4366{1}SO436{5} {2}4367{2}SO437 Compression header created to stored column prefix tokens. Token prefix replaced and suffix value calculated when necessary.
Page Data Compression (3/3) Dictionary data compression searches and replaces repeated values at page level. {1-3}595SO {5} {1} {5} {1}15 {B}{5} {1} {5} {1}35 510{5} {1}45 397{5} {1}55 146{5} {1}65 511{5} {B} {1}75 676{5} {1}85 514{5} SalesOrderIDStatusSalesOrderNumberCustomerIDAccountNumberSubTotal {1}4366{1}SO436{5} {2}4367{2}SO437
Page Data Compression (3/3) Dictionary data compression searches and replaces repeated values at page level. {1-3}595SO {5}{A} {A} {1} {5} {1} {5} {1} {5} {1}35 510{5} {1}45 397{5} {1}55 146{5} {1}65 511{5} {1}75 {A}{5} {1}85 514{5} SalesOrderIDStatusSalesOrderNumberCustomerIDAccountNumberSubTotal {1}4366{1}SO436{5} {2}4367{2}SO437 {A} 676{B}4420
Data Compression: Performance Implications
Memory Consumption Best Practices for using Microsoft SQL Server 2008 data compression with HP ProLiant and Integrity servers and HP StorageWorks EVA8x00
CPU Consumption Best Practices for using Microsoft SQL Server 2008 data compression with HP ProLiant and Integrity servers and HP StorageWorks EVA8x00
What to do?, and What not to do? 11 © 2008 Solid Quality Mentors Fact Tables Historic Information DeNormalized tables Transactional Tables Frequently Updated Tables CPU stressed Servers
Agenda
Filtered Indexes © 2008 Solid Quality Mentors 13 Clustered IndexNon-clustered Index
Filtered Indexes: Faster and better searches
What to do?, and What not to do? 15 © 2008 Solid Quality Mentors Nullable/Sparse Columns Last Period Index Active/Inactive Non-selective columns Frequently updated columns “Partition” by Filtered Index
Agenda
Resource Governor 17 © 2008 Solid Quality Mentors
Resource Governor Handling SLAs
Mixing Workloads (1/2) 19 Evaluation and recommendations for using Microsoft SQL Server 2008, HP
Mixing Workloads (2/2) Evaluation and recommendations for using Microsoft SQL Server 2008, HP
What to do?, and What not to do? 21 © 2008 Solid Quality Mentors Batch Processes (ETL, …) Limit Ad-hoc Reports Allocate based on budget Not “performance” tool Create too many group/pools Security
Agenda
Change Data Capture 23 © 2008 Solid Quality Mentors SalesOrderIDStatusCustomerIDSubTotal Transaction Log MetadataSalesOrderIDStatusCustomerIDSubTotal No triggers, based on service broker technology
Change Data Capture Building a Faster and Better ETL
What to do?, and What not to do? 25 © 2008 Solid Quality Mentors Use to Populate DW Use to create audit trails Consider I/O Impact ` Every Table/Every Column Turn Off SQL Server Agent Insert/Update
Agenda
Questions 27 © 2008 Solid Quality Mentors
Please remember to fill out evaluations