SlideShare une entreprise Scribd logo
1  sur  87
Extreme Performance for DBAs מאיר דודאי| SQL Server MVP| ואלינור
All transaction isolation level Differences between Serializeable and Repateable Read RangeX-S locking vsRangeX-U Deep dive into bookmark lookup  Page internals Indexes on Sparse columns
All transaction isolation level Differences between Serializeable and Repateable Read RangeX-S locking vsRangeX-U Deep dive into bookmark lookup  Page internals Indexes on Sparse columns
לפני קצת יותר מ-10 שנים...
לפני קצת יותר מ-10 שנים...
לפני קצת יותר מ-10 שנים...
מטרות היכרות עם תהליך P&T כלים חדשים ולא מוכרים לניהול Performance הבנת יישום נכון של Compression היכרות עם יכולות Scale out בגירסאות הנוכחיות וב-Denali
מי אני? מאיר דודאי: SQL Server MVP יועץ בתחום בסיסי נתונים ניסיון של למעלה מ-10 שנים ב-SQL Server עורך האתר:
ואלינור החברה המובילה בישראל במתן שירותים מקצועיים בתחום בסיסי נתונים: SQL Server, Oracle, MySQL צוות יועצים מוביל המתמחה בכלל הרבדים שלבסיסי הנתונים שותפים של Microsoft ו- Oracle נציגי מוצרים מובילים בתחום ה-DB מעל 300 לקוחות בכל המגזרים
My Assumptions About You You may be a part-time or full-time DBA You are familiar with SQL Server in previous versions You would like to learn about new features in SQL Server 2008&R2&2011 that can help you to manage and improve performance You are interested in good lunch, two days free from work, and some giveaways from advertisers
ארגז הכלים החדש שלכם
Agenda ,[object Object]
Detecting bottlenecks
New Performance Monitor in Windows 2008/R2
Performance Data Collector,[object Object]
Detecting bottlenecks
New Performance Monitor in Windows 2008/R2
Performance Data Collector,[object Object]
Having fun with deployment
DAC Concepts Data-tier Application Component ,[object Object]
Data-tier Application Component
Improves collaboration between developer and DBA
Moves developers from a procedural model to a declarative model
V1 is targeted at small appsSchema LOGICAL Tables, Views, Procs, UDFs PHYSICAL Users, Logins, Indexes DAC Deployment Profile Deployment Requirements, Management Policies
Key Concept: Utility Control Point  ,[object Object]
Shows health of
SQL Server instances
Data-tier applications
Database files, filegroups and volumes
Provides resource monitoring
CPU utilization
Storage spaceSQL02 SQL01 SQL03 SQL05 SQL04 DBA UCP Managed Instances Management Studio
DEVELOP DEPLOY MANAGE SQL Server Management Studio FinApp Dev DB 1 Deploy / Upgrade DAC Reverse Engineer DAC 2 SQL Server Management Studio 9 4 8 Visual Studio 2010 Manage, Register, Uninstall, Extract, Upgrade DAC Control Point Create policies DBA DBA 7 3 Deploy / Upgrade DAC HR .dacpac Hand-off to DBA Compile + Build FinApp Prod  DB 6 Developer SALES 5 Managed Instances
Utility Control Point
UCP
UCP
UCP Reports
UCP Reports http://bit.ly/j8xMwH
UCP Reports
What’s missing?	 Supports only SQL Server 2008 R2 (or later) Better management More counters can be useful… Monitors only DAC Or is it?
Fake DAC
What’s next?	 Denali’s Contained Databases…
Agenda ,[object Object]
Detecting bottlenecks
New Performance Monitor in Windows 2008/R2
Performance Data Collector,[object Object]
SSMS Activity Monitor
Performance Reports
Using Profiler to Detect Blocks
Clear Trace & Trace Analyzer
Agenda ,[object Object]
Detecting bottlenecks
New Performance Monitor in Windows 2008/R2
Performance Data Collector,[object Object]
Performance & Resource Monitor
New performance counters Database Mirroring  Compression stats Transactions volume Mirroring performance Custom counters
Custom counters
Agenda ,[object Object]
Detecting bottlenecks
New Performance Monitor in Windows 2008/R2
Performance Data Collector,[object Object]
OS perf indicators
Performance data
Extensible collection
Central repository
Consolidate information
Open interface
Management reports
Canned reports
Extensible ,[object Object]
Agenda Magic settings RCSI  Partition-level lock escalation Architectural design Bulk Load StreamInsight Caching Offloading Traffic Denali HADR
GreenRoad Case Study:RCSI GreenRoad is an Israeli startup improving driving behavior for fleets and consumers Works as SAAS More than 400 inserts/sec Users running queries and reports frequently Method used to increase concurrency: RCSI: Read Committed Snapshot Isolation
Tran2 (Select) Tran1 (Update) Reader Writer Blocking Data Page S-Lock Blocked Row-1 Row-1 X-Lock
Read Committed Snapshot New “flavor” of read committed Turn ON/OFF on a database Readers see committed values as of beginning of statement Writers do not block Readers Readers do not block Writers Writers do block writers Can greatly reduce locking / deadlocking without changing applications
Demo
Lock Escalation HOBT T1: IX T1: X Page Page Page T1: X T1: X T1: X T1: X T1: X Row Row Row T1: X T1: X T1: X Lock Escalation T1: IX
Lock Escalation Converting finer-grain locks to coarse grain locks. Row to Table Page to Table. Benefits Reduced locking overhead Reduces Memory requirement Triggered when Number of locks acquired on a rowset > 5000 Memory pressure
Partitioned Tables and Indexes SQL Server 2005 introduced partitioning, which some customers use to scale a query workload Another common use is to streamline maintenance and enable fast range inserts and removals from tables Partitioned Table FG1 FG2 FG3 Partition 2 Partition 3 Partition 1
Lock Escalation: The Problem Lock escalation on partitioned tables reduces concurrency as the table lock locks ALL partitions Only way to solve this in SQL Server 2005 is to disable lock escalation Query 1 Query 2 Partitioned Table IX X ESCALATE update update Partition 2 Partition 1 Partition 3 FG1 FG2 FG3
Lock Escalation: The Solution SQL Server 2008 allows lock escalation to the partition level, allowing concurrent access to other partitions Escalation to partition level does not block queries on other partitions Query 1 Query 2 Partitioned Table IX ESCALATE update update X Partition 2 Partition 1 Partition 3 FG1 FG2 FG3
Demo
Filtered Indexes An index with a WHERE clause to specify a criteria Essentially index only a subset of a the table Query optimizer most likely to use when WHERE clause matches that of the filtered index
Using Filtered Indexes Advantages of Filtered Indexes Improve query performance, partly by enhancing execution plan quality Smaller index maintenance costs Less disk storage
Using Filtered Indexes Scenarios for Filtered Indexes Sparse columns, where most data is null Columns with categories of values Columns with distinct ranges of values

Contenu connexe

Similaire à 1 extreme performance - part i

Concurrency Teched Presentation: Meir Dudai
Concurrency Teched Presentation: Meir DudaiConcurrency Teched Presentation: Meir Dudai
Concurrency Teched Presentation: Meir Dudaisqlserver.co.il
 
Meir Dudai - Concurrency
Meir Dudai - ConcurrencyMeir Dudai - Concurrency
Meir Dudai - Concurrencysqlserver.co.il
 
SQL Server 2016 new features
SQL Server 2016 new featuresSQL Server 2016 new features
SQL Server 2016 new featuresSpanishPASSVC
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersTobias Koprowski
 
Large Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsLarge Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsJoel Oleson
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016Marcos Freccia
 
In-memory ColumnStore Index
In-memory ColumnStore IndexIn-memory ColumnStore Index
In-memory ColumnStore IndexSolidQ
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersTobias Koprowski
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersTobias Koprowski
 
What SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePointWhat SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePointJ.D. Wade
 
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Alluxio, Inc.
 
AnalysisServices
AnalysisServicesAnalysisServices
AnalysisServiceswebuploader
 
Gs08 modernize your data platform with sql technologies wash dc
Gs08 modernize your data platform with sql technologies   wash dcGs08 modernize your data platform with sql technologies   wash dc
Gs08 modernize your data platform with sql technologies wash dcBob Ward
 
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...Ivan Sanders
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and dockerBob Ward
 
Azure Data platform
Azure Data platformAzure Data platform
Azure Data platformMostafa
 
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesAzure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesBob German
 
Red Hat Summit 2017 - Intro to SQL Server on RHEL and Open Shift
Red Hat Summit 2017 - Intro to SQL Server on RHEL and Open ShiftRed Hat Summit 2017 - Intro to SQL Server on RHEL and Open Shift
Red Hat Summit 2017 - Intro to SQL Server on RHEL and Open ShiftTravis Wright
 

Similaire à 1 extreme performance - part i (20)

Concurrency Teched Presentation: Meir Dudai
Concurrency Teched Presentation: Meir DudaiConcurrency Teched Presentation: Meir Dudai
Concurrency Teched Presentation: Meir Dudai
 
Meir Dudai - Concurrency
Meir Dudai - ConcurrencyMeir Dudai - Concurrency
Meir Dudai - Concurrency
 
Dat308
Dat308Dat308
Dat308
 
SQL Server 2016 new features
SQL Server 2016 new featuresSQL Server 2016 new features
SQL Server 2016 new features
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
 
Large Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsLarge Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint Deployments
 
Novidades do SQL Server 2016
Novidades do SQL Server 2016Novidades do SQL Server 2016
Novidades do SQL Server 2016
 
In-memory ColumnStore Index
In-memory ColumnStore IndexIn-memory ColumnStore Index
In-memory ColumnStore Index
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
 
What SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePointWhat SQL DBAs need to know about SharePoint
What SQL DBAs need to know about SharePoint
 
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...Building a high-performance data lake analytics engine at Alibaba Cloud with ...
Building a high-performance data lake analytics engine at Alibaba Cloud with ...
 
Database CI/CD Pipeline
Database CI/CD PipelineDatabase CI/CD Pipeline
Database CI/CD Pipeline
 
AnalysisServices
AnalysisServicesAnalysisServices
AnalysisServices
 
Gs08 modernize your data platform with sql technologies wash dc
Gs08 modernize your data platform with sql technologies   wash dcGs08 modernize your data platform with sql technologies   wash dc
Gs08 modernize your data platform with sql technologies wash dc
 
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and docker
 
Azure Data platform
Azure Data platformAzure Data platform
Azure Data platform
 
Azure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web ServicesAzure for SharePoint Developers - Workshop - Part 3: Web Services
Azure for SharePoint Developers - Workshop - Part 3: Web Services
 
Red Hat Summit 2017 - Intro to SQL Server on RHEL and Open Shift
Red Hat Summit 2017 - Intro to SQL Server on RHEL and Open ShiftRed Hat Summit 2017 - Intro to SQL Server on RHEL and Open Shift
Red Hat Summit 2017 - Intro to SQL Server on RHEL and Open Shift
 

Plus de sqlserver.co.il

Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013sqlserver.co.il
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cachesqlserver.co.il
 
Sql server user group news january 2013
Sql server user group news   january 2013Sql server user group news   january 2013
Sql server user group news january 2013sqlserver.co.il
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012sqlserver.co.il
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2sqlserver.co.il
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1sqlserver.co.il
 
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended EventsSQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Eventssqlserver.co.il
 
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoreSQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoresqlserver.co.il
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACsqlserver.co.il
 
SQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: SpatialSQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: Spatialsqlserver.co.il
 
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf FraenkelBi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf Fraenkelsqlserver.co.il
 
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
Fast transition to sql server 2012 from mssql 2005 2008 for  developers - Dav...Fast transition to sql server 2012 from mssql 2005 2008 for  developers - Dav...
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...sqlserver.co.il
 
Extreme performance - IDF UG
Extreme performance - IDF UGExtreme performance - IDF UG
Extreme performance - IDF UGsqlserver.co.il
 

Plus de sqlserver.co.il (20)

Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cache
 
Sql server user group news january 2013
Sql server user group news   january 2013Sql server user group news   january 2013
Sql server user group news january 2013
 
DAC 2012
DAC 2012DAC 2012
DAC 2012
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
 
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended EventsSQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
 
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoreSQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStore
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DAC
 
SQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: SpatialSQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: Spatial
 
מיכאל
מיכאלמיכאל
מיכאל
 
נועם
נועםנועם
נועם
 
עדי
עדיעדי
עדי
 
מיכאל
מיכאלמיכאל
מיכאל
 
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf FraenkelBi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
 
DBCC - Dubi Lebel
DBCC - Dubi LebelDBCC - Dubi Lebel
DBCC - Dubi Lebel
 
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
Fast transition to sql server 2012 from mssql 2005 2008 for  developers - Dav...Fast transition to sql server 2012 from mssql 2005 2008 for  developers - Dav...
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
 
ISUG 113: File stream
ISUG 113: File streamISUG 113: File stream
ISUG 113: File stream
 
Extreme performance - IDF UG
Extreme performance - IDF UGExtreme performance - IDF UG
Extreme performance - IDF UG
 

Dernier

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 

Dernier (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 

1 extreme performance - part i

  • 1. Extreme Performance for DBAs מאיר דודאי| SQL Server MVP| ואלינור
  • 2. All transaction isolation level Differences between Serializeable and Repateable Read RangeX-S locking vsRangeX-U Deep dive into bookmark lookup Page internals Indexes on Sparse columns
  • 3. All transaction isolation level Differences between Serializeable and Repateable Read RangeX-S locking vsRangeX-U Deep dive into bookmark lookup Page internals Indexes on Sparse columns
  • 4. לפני קצת יותר מ-10 שנים...
  • 5. לפני קצת יותר מ-10 שנים...
  • 6. לפני קצת יותר מ-10 שנים...
  • 7. מטרות היכרות עם תהליך P&T כלים חדשים ולא מוכרים לניהול Performance הבנת יישום נכון של Compression היכרות עם יכולות Scale out בגירסאות הנוכחיות וב-Denali
  • 8. מי אני? מאיר דודאי: SQL Server MVP יועץ בתחום בסיסי נתונים ניסיון של למעלה מ-10 שנים ב-SQL Server עורך האתר:
  • 9. ואלינור החברה המובילה בישראל במתן שירותים מקצועיים בתחום בסיסי נתונים: SQL Server, Oracle, MySQL צוות יועצים מוביל המתמחה בכלל הרבדים שלבסיסי הנתונים שותפים של Microsoft ו- Oracle נציגי מוצרים מובילים בתחום ה-DB מעל 300 לקוחות בכל המגזרים
  • 10. My Assumptions About You You may be a part-time or full-time DBA You are familiar with SQL Server in previous versions You would like to learn about new features in SQL Server 2008&R2&2011 that can help you to manage and improve performance You are interested in good lunch, two days free from work, and some giveaways from advertisers
  • 11.
  • 12.
  • 13.
  • 15.
  • 17. New Performance Monitor in Windows 2008/R2
  • 18.
  • 20. New Performance Monitor in Windows 2008/R2
  • 21.
  • 22. Having fun with deployment
  • 23.
  • 25. Improves collaboration between developer and DBA
  • 26. Moves developers from a procedural model to a declarative model
  • 27. V1 is targeted at small appsSchema LOGICAL Tables, Views, Procs, UDFs PHYSICAL Users, Logins, Indexes DAC Deployment Profile Deployment Requirements, Management Policies
  • 28.
  • 35. Storage spaceSQL02 SQL01 SQL03 SQL05 SQL04 DBA UCP Managed Instances Management Studio
  • 36. DEVELOP DEPLOY MANAGE SQL Server Management Studio FinApp Dev DB 1 Deploy / Upgrade DAC Reverse Engineer DAC 2 SQL Server Management Studio 9 4 8 Visual Studio 2010 Manage, Register, Uninstall, Extract, Upgrade DAC Control Point Create policies DBA DBA 7 3 Deploy / Upgrade DAC HR .dacpac Hand-off to DBA Compile + Build FinApp Prod DB 6 Developer SALES 5 Managed Instances
  • 38. UCP
  • 39. UCP
  • 43. What’s missing? Supports only SQL Server 2008 R2 (or later) Better management More counters can be useful… Monitors only DAC Or is it?
  • 45. What’s next? Denali’s Contained Databases…
  • 46.
  • 48. New Performance Monitor in Windows 2008/R2
  • 49.
  • 52. Using Profiler to Detect Blocks
  • 53. Clear Trace & Trace Analyzer
  • 54.
  • 56. New Performance Monitor in Windows 2008/R2
  • 57.
  • 59. New performance counters Database Mirroring Compression stats Transactions volume Mirroring performance Custom counters
  • 61.
  • 63. New Performance Monitor in Windows 2008/R2
  • 64.
  • 73.
  • 74. Agenda Magic settings RCSI Partition-level lock escalation Architectural design Bulk Load StreamInsight Caching Offloading Traffic Denali HADR
  • 75. GreenRoad Case Study:RCSI GreenRoad is an Israeli startup improving driving behavior for fleets and consumers Works as SAAS More than 400 inserts/sec Users running queries and reports frequently Method used to increase concurrency: RCSI: Read Committed Snapshot Isolation
  • 76. Tran2 (Select) Tran1 (Update) Reader Writer Blocking Data Page S-Lock Blocked Row-1 Row-1 X-Lock
  • 77. Read Committed Snapshot New “flavor” of read committed Turn ON/OFF on a database Readers see committed values as of beginning of statement Writers do not block Readers Readers do not block Writers Writers do block writers Can greatly reduce locking / deadlocking without changing applications
  • 78. Demo
  • 79. Lock Escalation HOBT T1: IX T1: X Page Page Page T1: X T1: X T1: X T1: X T1: X Row Row Row T1: X T1: X T1: X Lock Escalation T1: IX
  • 80. Lock Escalation Converting finer-grain locks to coarse grain locks. Row to Table Page to Table. Benefits Reduced locking overhead Reduces Memory requirement Triggered when Number of locks acquired on a rowset > 5000 Memory pressure
  • 81. Partitioned Tables and Indexes SQL Server 2005 introduced partitioning, which some customers use to scale a query workload Another common use is to streamline maintenance and enable fast range inserts and removals from tables Partitioned Table FG1 FG2 FG3 Partition 2 Partition 3 Partition 1
  • 82. Lock Escalation: The Problem Lock escalation on partitioned tables reduces concurrency as the table lock locks ALL partitions Only way to solve this in SQL Server 2005 is to disable lock escalation Query 1 Query 2 Partitioned Table IX X ESCALATE update update Partition 2 Partition 1 Partition 3 FG1 FG2 FG3
  • 83. Lock Escalation: The Solution SQL Server 2008 allows lock escalation to the partition level, allowing concurrent access to other partitions Escalation to partition level does not block queries on other partitions Query 1 Query 2 Partitioned Table IX ESCALATE update update X Partition 2 Partition 1 Partition 3 FG1 FG2 FG3
  • 84. Demo
  • 85. Filtered Indexes An index with a WHERE clause to specify a criteria Essentially index only a subset of a the table Query optimizer most likely to use when WHERE clause matches that of the filtered index
  • 86. Using Filtered Indexes Advantages of Filtered Indexes Improve query performance, partly by enhancing execution plan quality Smaller index maintenance costs Less disk storage
  • 87. Using Filtered Indexes Scenarios for Filtered Indexes Sparse columns, where most data is null Columns with categories of values Columns with distinct ranges of values
  • 89. New server option in SQL Server 2008 Only a stub is cached on first execution Full plan cached after second execution SP_CONFIGURE 'show advanced options',1RECONFIGUREGO SP_CONFIGURE 'optimize for ad hoc workloads',1RECONFIGUREGO Optimize for ad hoc workloads
  • 90. “I would not use it on some DWH systems” “Why is this not on by default?” “I can’t think of a reason why opt for adhoc workloads would ever really be a problem” “I definitely recommend it!” “Best movie of 2011! Breathtaking!” “But paintball guns are also not very pleasant!” How good is it?
  • 91. Codename Lyngby Case Study: Power of bulk inserts Security/audit system 50GB of data inserted daily Data is kept for one year and should be available for queries and reports at any time Method used to increase concurrency: Bulk inserts
  • 92. Benefits of Bulk Inserts Improved concurrency Allow application-database decoupling In Lyngby case – 50GB a day! http://www.tapuz.co.il/blog/userBlog.asp?FolderName=Hygge
  • 93. Bulk Inserts & RCSI: SQLCAT Benchmark What happens when you query a table while bulk inserts are running?
  • 94. Bulk Inserts & RCSI: SQLCAT Benchmark And with RCSI? Bulk loading does not affect the size of the version store in tempdb under RCSI Keep in mind: RCSI adds 14 noncompressible bytes into every row in every table Bottom line: RCSI works extremely well with bulk inserts and achieves improved concurrency More details about this benchmark: http://sqlcat.com/technicalnotes/archive/2009/04/06/bulk-loading-data-into-a-table-with-concurrent-queries.aspx
  • 95. StreamInsight:Complex Event Processing SQL Server 2008 R2 feature Processing and querying of event data streams Data queried while “in flight” May involve multiple concurrent event sources Works with high data rates Aims for near-zero latency
  • 96. Isn’t This Just a Database Application? Event request output stream input stream response
  • 97. Caching Your database can get some rest...
  • 99. Other solutions Memcache Requires application change 3rd party Usually transparent
  • 100. Tapuz Case Study: Offloading Traffic Tapuz is the leading user content based website in Israel 1,200 forums 74,000 blogs 500,000 visitors each month More than 4000 queries/sec Method used to increase concurrency: Offloading using Transactional Replication
  • 102.
  • 106.
  • 107. Solution – SQL Server 2008 / R2 Store data efficiently in the row/page (+) More data can fit in memory (+) Better Performance for I/O bound workload (-) Performance degradation for CPU bound workload
  • 108. Data Compression SQL Server 2008 ROW and PAGE compression Backup Compression SQL Server 2008 R2 Unicode compression
  • 109. Enabling Compression Examples Latest partition uncompressed Uncompressed PAGE Compressed ROW Compressed Jan-Mar Apr-June July-Sept Oct-Dec
  • 110. Should it be so complex? In real life – usually compress the entire large tables using page compression…
  • 111. Summary – Compression Can reduce size of database significantly Lower total cost of ownership (TCO) Easy to enable/disable No application changes Performance gains!
  • 113. Resource Hogs What are some of the biggest resource hogs a DBA runs into? Bulk Load Processes Data Archiving Poorly Coded Queries (Runaways) Reporting…
  • 114. Reporting in Production Is this a best practice???
  • 116. Reporting In Production NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
  • 117. Reporting In Production OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!
  • 118. Resource Governor Similar to a governor you would find on a car It limits the “speed” that a SQL Server session can run at
  • 119. Resource Governor – Workloads Ability to differentiate workloads based on connection property e.g. app_name, login, user, db name Per-request limits Max memory % Max CPU time Grant timeout Max Requests

Notes de l'éditeur

  1. No escalation from Row to PageEach lock structure is 100 bytesNumber of locks acquired on a rowset > 5000 - Periodically after that
  2. Self-explanatory. See Books Online for more details about partitioning. Also see http://msdn2.microsoft.com/en-us/library/ms345146.aspx
  3. Query 1 is updating partition 1. It hits the escalation threshold and escalates to a TABLE X lock. Query 2 tries to update partition 3 and can’t because of the table X lock, even though nothing in partition 3 is being altered by query 1.
  4. Instead of escalating to the table level and blocking all other queries on the table, you can now choose to have escalation to the partition level, which allows concurrent queries on different partitions.
  5. אחד האהובים עלי
  6. Complex event processing involves the processing and querying of data when the data is in flight. The data needs to be processed before there is time to persist it.Such processing involves very high data rates and often deals with multiple concurrent event sources and multiple output data.The aim is to process with as little latency as possible.
  7. Database applications work in much slower times. For complex event processing applications, the latencies involved are much smaller.
  8. Complex event processing involves the processing and querying of data when the data is in flight. The data needs to be processed before there is time to persist it.Such processing involves very high data rates and often deals with multiple concurrent event sources and multiple output data.The aim is to process with as little latency as possible.
  9. Complex event processing involves the processing and querying of data when the data is in flight. The data needs to be processed before there is time to persist it.Such processing involves very high data rates and often deals with multiple concurrent event sources and multiple output data.The aim is to process with as little latency as possible.
  10. Complex event processing involves the processing and querying of data when the data is in flight. The data needs to be processed before there is time to persist it.Such processing involves very high data rates and often deals with multiple concurrent event sources and multiple output data.The aim is to process with as little latency as possible.