SlideShare a Scribd company logo
Advanced Index, Partitioning and
Compression Strategies for
SQL Server
Neil Hambly
Senior DBA & Engineer,
Confio Software
8/16/2013 1
Who Am I?
• Senior DBA/Engineer for Confio Software
– NeilHambly@confio.com {Based in the UK}
• DBA – 14+ Years, SQL Server 6.5 - 2012
• Held # of DB roles @ many leading organizations
• Regular International PASS Presenter @
SQL Conferences, User-Groups & Webinars
• SQL London PASS Chapter Leader, UK Events Organizer
• Regular @ UK & International community events
• Twitter: @Neil_Hambly & @Confio Contributing Author
• Articles @ Confio.com & My blog
8/16/2013 2
Agenda
• Talk about the two features – Compression & Partitioning
• Using Data Compression in SQL Server 2005+
– Compression
• Editions, Data types
• Vardecimal Compression (2005 SP2)
• Page | Row Compression (2008+)
• Unicode Compression
• Estimate space & resources
– Partitioning
– Combining with other features
– Demos
• Partition-Info Script
• Finding objects for compression
• Q&A + further links
8/16/2013 3
Data Types
8/16/2013 4
Data Compression was introduced in SQL 2005 (SP2) via vardecimal storage
This was superseded in SQL Server in 2008 Version (Row & Page level)
Compression feature is only available in Enterprise and Developer SKU’s
Note: NULL and 0 values across all data types are optimized to take 0 bytes in addition to 4 bits/per Column
Data Type / Benefits with Data Compression
Yes – depends on data No or little benefit (Normally)
bit / smallint / int / bigint tinyint / uniqueidentifier
decimal / numeric
datetime / datetime2 / datetimeoffset smalldatetime / date / time
char / nchar / nvarchar varchar / text / ntext / image
binary / timestamp / Rowversion varbinary
money / smallmoney
float / real
sql_variant / FileStream
cursor / table / xml
SQL Server 2005 SP2
(Vardecimal)
The vardecimal works the same way as the varchar works
for efficiently storing alphanumeric data.
8/16/2013 5
HOW TO TURN ON THE VARDECIMAL OPTION
Step 1:
exec sp_db_vardecimal_storage_format '<dbname>', 'ON'
This option will enable the vardecimal storage on the specified database.
Step 2:
exec sp_tableoption '<table>', 'vardecimal storage format', 1
This option will turn on the vardecimal storage for the existing table.
HOW TO ESTIMATE WHETHER IT IS WORTH TURNING
ON THIS OPTION
sys.sp_estimated_rowsize_reduction_for_vardecimal '<table>'
Column
precision
Original fixed
decimal size
(bytes)
Maximum
vardecimal
data area
(bytes)
Overhead
to store
offset
(bytes)
Maximum
vardecimal
storage
used (bytes)
1-3 5 3 2 5
4-6 5 4 2 6
7-9 5 5 2 7
10-12 9 6 2 8
13-15 9 8 2 10
16-18 9 9 2 11
19 9 10 2 12
20-21 13 10 2 12
22-24 13 11 2 13
25-27 13 13 2 15
28 13 14 2 16
29-30 17 14 2 16
31-33 17 15 2 17
34-36 17 16 2 18
37-38 17 18 2 20
Page & Row Level Compression
8/16/2013 6
Since 2008 version, we have new compression algorithms available
Compressing the leaf level of tables and indexes with page compression consists of
three operations, these are done in the following order:
1. Row compression
2. Prefix compression
3. Dictionary compression
Note: When using page compression, the non–leaf-level pages of indexes are only row compressed
Row Compression Prefix Compression Dictionary Compression
Unicode Compression
Space savings that can be achieved for different locales (15-50%)
8/16/2013 7
Standard Compression Scheme for Unicode
(SCSU) SCSU algorithm to compress Unicode
values that are stored in row or page
compressed objects
Unicode compression supports the fixed-
length nchar(n) and nvarchar(n) data types.
Data values that are stored off row or in
nvarchar(max) columns are not compressed
Locale Compression %
English 50%
German 50%
Hindi 50%
Turkish 48%
Vietnamese 39%
Japanese 15%
SCSU can also switch to UTF-16 internally to handle non-alphabetic languages
Supercharge SQL Server Performance with
Indexing, Partitioning and Compression
View this full 60-minute webinar, compliments of Confio Software,
to supercharge SQL Server performance using advanced techniques
for indexing, partitioning and/or compression. You’ll learn:
• How to identify which objects will benefit the most from
indexing
• How to decide when you should combine indexing, partitioning
and compression
• How these techniques have been applied in real-world scenarios
• How to you can use available demo scripts to determine which
objects in your environment will benefit from these techniques
www.confio.com
8/16/2013 8
Ad

More Related Content

What's hot (15)

NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
Meshal Albeedhani
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
BADR
 
MySQL vs. MonetDB
MySQL vs. MonetDBMySQL vs. MonetDB
MySQL vs. MonetDB
"FENG "GEORGE"" YU
 
Scalability
ScalabilityScalability
Scalability
sergeyz
 
MySQL vs MonetDB Bencharmarks
MySQL vs MonetDB BencharmarksMySQL vs MonetDB Bencharmarks
MySQL vs MonetDB Bencharmarks
"FENG "GEORGE"" YU
 
MongoDB Datacenter Awareness (mongosf2012)
MongoDB Datacenter Awareness (mongosf2012)MongoDB Datacenter Awareness (mongosf2012)
MongoDB Datacenter Awareness (mongosf2012)
Scott Hernandez
 
Presentation db2 best practices for optimal performance
Presentation   db2 best practices for optimal performancePresentation   db2 best practices for optimal performance
Presentation db2 best practices for optimal performance
solarisyougood
 
Big Data Day LA 2015 - HBase at Factual: Real time and Batch Uses by Molly O'...
Big Data Day LA 2015 - HBase at Factual: Real time and Batch Uses by Molly O'...Big Data Day LA 2015 - HBase at Factual: Real time and Batch Uses by Molly O'...
Big Data Day LA 2015 - HBase at Factual: Real time and Batch Uses by Molly O'...
Data Con LA
 
IBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration Basics
IBM
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
Ajeet Singh
 
in-memory database system and low latency
in-memory database system and low latencyin-memory database system and low latency
in-memory database system and low latency
hyeongchae lee
 
MonetDB :column-store approach in database
MonetDB :column-store approach in databaseMonetDB :column-store approach in database
MonetDB :column-store approach in database
Nikhil Patteri
 
Four NoSQL Databases You Should Know
Four NoSQL Databases You Should KnowFour NoSQL Databases You Should Know
Four NoSQL Databases You Should Know
Mahmoud Khaled
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
VishalJharwade
 
NoSQL - 05March2014 Seminar
NoSQL - 05March2014 SeminarNoSQL - 05March2014 Seminar
NoSQL - 05March2014 Seminar
Jainul Musani
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
BADR
 
Scalability
ScalabilityScalability
Scalability
sergeyz
 
MongoDB Datacenter Awareness (mongosf2012)
MongoDB Datacenter Awareness (mongosf2012)MongoDB Datacenter Awareness (mongosf2012)
MongoDB Datacenter Awareness (mongosf2012)
Scott Hernandez
 
Presentation db2 best practices for optimal performance
Presentation   db2 best practices for optimal performancePresentation   db2 best practices for optimal performance
Presentation db2 best practices for optimal performance
solarisyougood
 
Big Data Day LA 2015 - HBase at Factual: Real time and Batch Uses by Molly O'...
Big Data Day LA 2015 - HBase at Factual: Real time and Batch Uses by Molly O'...Big Data Day LA 2015 - HBase at Factual: Real time and Batch Uses by Molly O'...
Big Data Day LA 2015 - HBase at Factual: Real time and Batch Uses by Molly O'...
Data Con LA
 
IBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration Basics
IBM
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
Ajeet Singh
 
in-memory database system and low latency
in-memory database system and low latencyin-memory database system and low latency
in-memory database system and low latency
hyeongchae lee
 
MonetDB :column-store approach in database
MonetDB :column-store approach in databaseMonetDB :column-store approach in database
MonetDB :column-store approach in database
Nikhil Patteri
 
Four NoSQL Databases You Should Know
Four NoSQL Databases You Should KnowFour NoSQL Databases You Should Know
Four NoSQL Databases You Should Know
Mahmoud Khaled
 
NoSQL - 05March2014 Seminar
NoSQL - 05March2014 SeminarNoSQL - 05March2014 Seminar
NoSQL - 05March2014 Seminar
Jainul Musani
 

Viewers also liked (7)

Geek Sync | SQL Server Indexing Basics
Geek Sync | SQL Server Indexing BasicsGeek Sync | SQL Server Indexing Basics
Geek Sync | SQL Server Indexing Basics
IDERA Software
 
Indexing basics
Indexing basicsIndexing basics
Indexing basics
Sourabh Agarwal
 
Writing optimal queries
Writing optimal queriesWriting optimal queries
Writing optimal queries
Sourabh Agarwal
 
Indexes
IndexesIndexes
Indexes
Randy Riness @ South Puget Sound Community College
 
Database index
Database indexDatabase index
Database index
Riteshkiit
 
PostgreSQL: Advanced indexing
PostgreSQL: Advanced indexingPostgreSQL: Advanced indexing
PostgreSQL: Advanced indexing
Hans-Jürgen Schönig
 
Indexing
IndexingIndexing
Indexing
Ime Amor Mortel
 
Ad

Similar to Advanced Index, Partitioning and Compression Strategies for SQL Server (20)

Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Charley Hanania
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part i
sqlserver.co.il
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
Tobias Koprowski
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
Tobias Koprowski
 
Apache CarbonData:New high performance data format for faster data analysis
Apache CarbonData:New high performance data format for faster data analysisApache CarbonData:New high performance data format for faster data analysis
Apache CarbonData:New high performance data format for faster data analysis
liang chen
 
What's new in SQL Server 2016
What's new in SQL Server 2016What's new in SQL Server 2016
What's new in SQL Server 2016
James Serra
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
Alfredo Abate
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the Game
PARIKSHIT SAVJANI
 
Hp vertica certification guide
Hp vertica certification guideHp vertica certification guide
Hp vertica certification guide
neinamat
 
Hpverticacertificationguide 150322232921-conversion-gate01
Hpverticacertificationguide 150322232921-conversion-gate01Hpverticacertificationguide 150322232921-conversion-gate01
Hpverticacertificationguide 150322232921-conversion-gate01
Anvith S. Upadhyaya
 
Presentations from the Cloudera Impala meetup on Aug 20 2013
Presentations from the Cloudera Impala meetup on Aug 20 2013Presentations from the Cloudera Impala meetup on Aug 20 2013
Presentations from the Cloudera Impala meetup on Aug 20 2013
Cloudera, Inc.
 
SQL Server 2016 novelties
SQL Server 2016 noveltiesSQL Server 2016 novelties
SQL Server 2016 novelties
MSDEVMTL
 
Sap abap
Sap abapSap abap
Sap abap
nrj10
 
Data warehousing guidelines for bi and BAM solutions
Data warehousing guidelines for bi and BAM solutionsData warehousing guidelines for bi and BAM solutions
Data warehousing guidelines for bi and BAM solutions
Shehap Elnagar
 
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginnersKoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
Tobias Koprowski
 
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for ProgrammersSQL Server 2008 Development for Programmers
SQL Server 2008 Development for Programmers
Adam Hutson
 
Ebook10
Ebook10Ebook10
Ebook10
kaashiv1
 
Sql interview question part 10
Sql interview question part 10Sql interview question part 10
Sql interview question part 10
kaashiv1
 
Sql 2016 - What's New
Sql 2016 - What's NewSql 2016 - What's New
Sql 2016 - What's New
dpcobb
 
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Pass chapter meeting dec 2013 - compression a hidden gem for io heavy databas...
Charley Hanania
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part i
sqlserver.co.il
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
Tobias Koprowski
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
Tobias Koprowski
 
Apache CarbonData:New high performance data format for faster data analysis
Apache CarbonData:New high performance data format for faster data analysisApache CarbonData:New high performance data format for faster data analysis
Apache CarbonData:New high performance data format for faster data analysis
liang chen
 
What's new in SQL Server 2016
What's new in SQL Server 2016What's new in SQL Server 2016
What's new in SQL Server 2016
James Serra
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
Alfredo Abate
 
How SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the GameHow SQL Server 2016 SP1 Changes the Game
How SQL Server 2016 SP1 Changes the Game
PARIKSHIT SAVJANI
 
Hp vertica certification guide
Hp vertica certification guideHp vertica certification guide
Hp vertica certification guide
neinamat
 
Hpverticacertificationguide 150322232921-conversion-gate01
Hpverticacertificationguide 150322232921-conversion-gate01Hpverticacertificationguide 150322232921-conversion-gate01
Hpverticacertificationguide 150322232921-conversion-gate01
Anvith S. Upadhyaya
 
Presentations from the Cloudera Impala meetup on Aug 20 2013
Presentations from the Cloudera Impala meetup on Aug 20 2013Presentations from the Cloudera Impala meetup on Aug 20 2013
Presentations from the Cloudera Impala meetup on Aug 20 2013
Cloudera, Inc.
 
SQL Server 2016 novelties
SQL Server 2016 noveltiesSQL Server 2016 novelties
SQL Server 2016 novelties
MSDEVMTL
 
Sap abap
Sap abapSap abap
Sap abap
nrj10
 
Data warehousing guidelines for bi and BAM solutions
Data warehousing guidelines for bi and BAM solutionsData warehousing guidelines for bi and BAM solutions
Data warehousing guidelines for bi and BAM solutions
Shehap Elnagar
 
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginnersKoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
KoprowskiT_SQLRelay2014#2_Southampton_MaintenancePlansForBeginners
Tobias Koprowski
 
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for ProgrammersSQL Server 2008 Development for Programmers
SQL Server 2008 Development for Programmers
Adam Hutson
 
Sql interview question part 10
Sql interview question part 10Sql interview question part 10
Sql interview question part 10
kaashiv1
 
Sql 2016 - What's New
Sql 2016 - What's NewSql 2016 - What's New
Sql 2016 - What's New
dpcobb
 
Ad

Recently uploaded (20)

Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 

Advanced Index, Partitioning and Compression Strategies for SQL Server

  • 1. Advanced Index, Partitioning and Compression Strategies for SQL Server Neil Hambly Senior DBA & Engineer, Confio Software 8/16/2013 1
  • 2. Who Am I? • Senior DBA/Engineer for Confio Software – NeilHambly@confio.com {Based in the UK} • DBA – 14+ Years, SQL Server 6.5 - 2012 • Held # of DB roles @ many leading organizations • Regular International PASS Presenter @ SQL Conferences, User-Groups & Webinars • SQL London PASS Chapter Leader, UK Events Organizer • Regular @ UK & International community events • Twitter: @Neil_Hambly & @Confio Contributing Author • Articles @ Confio.com & My blog 8/16/2013 2
  • 3. Agenda • Talk about the two features – Compression & Partitioning • Using Data Compression in SQL Server 2005+ – Compression • Editions, Data types • Vardecimal Compression (2005 SP2) • Page | Row Compression (2008+) • Unicode Compression • Estimate space & resources – Partitioning – Combining with other features – Demos • Partition-Info Script • Finding objects for compression • Q&A + further links 8/16/2013 3
  • 4. Data Types 8/16/2013 4 Data Compression was introduced in SQL 2005 (SP2) via vardecimal storage This was superseded in SQL Server in 2008 Version (Row & Page level) Compression feature is only available in Enterprise and Developer SKU’s Note: NULL and 0 values across all data types are optimized to take 0 bytes in addition to 4 bits/per Column Data Type / Benefits with Data Compression Yes – depends on data No or little benefit (Normally) bit / smallint / int / bigint tinyint / uniqueidentifier decimal / numeric datetime / datetime2 / datetimeoffset smalldatetime / date / time char / nchar / nvarchar varchar / text / ntext / image binary / timestamp / Rowversion varbinary money / smallmoney float / real sql_variant / FileStream cursor / table / xml
  • 5. SQL Server 2005 SP2 (Vardecimal) The vardecimal works the same way as the varchar works for efficiently storing alphanumeric data. 8/16/2013 5 HOW TO TURN ON THE VARDECIMAL OPTION Step 1: exec sp_db_vardecimal_storage_format '<dbname>', 'ON' This option will enable the vardecimal storage on the specified database. Step 2: exec sp_tableoption '<table>', 'vardecimal storage format', 1 This option will turn on the vardecimal storage for the existing table. HOW TO ESTIMATE WHETHER IT IS WORTH TURNING ON THIS OPTION sys.sp_estimated_rowsize_reduction_for_vardecimal '<table>' Column precision Original fixed decimal size (bytes) Maximum vardecimal data area (bytes) Overhead to store offset (bytes) Maximum vardecimal storage used (bytes) 1-3 5 3 2 5 4-6 5 4 2 6 7-9 5 5 2 7 10-12 9 6 2 8 13-15 9 8 2 10 16-18 9 9 2 11 19 9 10 2 12 20-21 13 10 2 12 22-24 13 11 2 13 25-27 13 13 2 15 28 13 14 2 16 29-30 17 14 2 16 31-33 17 15 2 17 34-36 17 16 2 18 37-38 17 18 2 20
  • 6. Page & Row Level Compression 8/16/2013 6 Since 2008 version, we have new compression algorithms available Compressing the leaf level of tables and indexes with page compression consists of three operations, these are done in the following order: 1. Row compression 2. Prefix compression 3. Dictionary compression Note: When using page compression, the non–leaf-level pages of indexes are only row compressed Row Compression Prefix Compression Dictionary Compression
  • 7. Unicode Compression Space savings that can be achieved for different locales (15-50%) 8/16/2013 7 Standard Compression Scheme for Unicode (SCSU) SCSU algorithm to compress Unicode values that are stored in row or page compressed objects Unicode compression supports the fixed- length nchar(n) and nvarchar(n) data types. Data values that are stored off row or in nvarchar(max) columns are not compressed Locale Compression % English 50% German 50% Hindi 50% Turkish 48% Vietnamese 39% Japanese 15% SCSU can also switch to UTF-16 internally to handle non-alphabetic languages
  • 8. Supercharge SQL Server Performance with Indexing, Partitioning and Compression View this full 60-minute webinar, compliments of Confio Software, to supercharge SQL Server performance using advanced techniques for indexing, partitioning and/or compression. You’ll learn: • How to identify which objects will benefit the most from indexing • How to decide when you should combine indexing, partitioning and compression • How these techniques have been applied in real-world scenarios • How to you can use available demo scripts to determine which objects in your environment will benefit from these techniques www.confio.com 8/16/2013 8
  翻译: