SlideShare a Scribd company logo
1 of 33
Boris Hristov
SQL Server MVP, Speaker, Trainer, Blogger and DBA
Top 5 T-SQL Improvements
in SQL Server 2014
Sponsors
That’s not a Hekaton Talk!
So who am I?
@BorisHristov
So who am I?
things that can make your life better
Here’s how this will go…
time
Delayed Durability
A Atomic
Isolated
Consistent
Durable
C
I
D
Data pages are located in,
or read into, the buffer cache
and then modified
2
Modification is recorded
in transaction log on disk3
Later, checkpoint writes
dirty pages to database
4
Buffer Cache
Transaction’s lifecycle
Here’s the reason why it’s slow
Data pages are located in,
or read into, the buffer cache
and then modified
2
Modification is recorded
in transaction log on disk3
Later, checkpoint writes
dirty pages to database
4
Buffer Cache
Transaction’s lifecycle
Yes,
you can lose data!
DEMO
Delayed Durability
SELECT INTO
Prior SQL Server 2014:
Serial Execution Plans
SQL Server 2014:
Parallel Execution Plans
Why don’t we speed up a bit?
Talk with the DBAs
to design a proper
disk and data layout!
You want that speed, right?
DEMO
SELECT INTO
Cardinality Estimator
Why is the CE so important?
Why is the CE so important?
The CE
has not been
changed since
SQL Server 7.0
…and at the same time
Queries with Multiple
Predicates
Queries Joining Multiple
Tables
New Data Not Presented
in the Stats
Almost everywhere…
(this, oh btw, means you have
to test a lot!)
Where to expect changes?
DEMO
Cardinality Estimator
Inline Index Definitions
(remember this one for later)
SQL Server 2012
SQL Server 2014
Remember this improvement
DEMO
Inline Index Definitions
Partitioning Improvements
Numbers
0
…
8000
Partition 2
2501
…
4000
Partition 3
4001
…
8000
Why is partitioning both cool and not?
Partition 1
0
…
2500
DEMO
Partitioning Improvements
Temporary Objects Caching
In summary
Delayed Durability
Parallel SELECT INTO
Cardinality Estimator
Inline Index Creation
Partitioning Improvements
Testing is
important!
Resources you can use
Click me!
Please give feedback to us
 http://speakerscore.com/sqlsaturday376
 Thank you!
Thank you!
@BorisHristov
brshristov@live.com
www.borishristov.com

More Related Content

Viewers also liked

Intro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionIntro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionMedhat Dawoud
 
SQL Server 2008 Overview
SQL Server 2008 OverviewSQL Server 2008 Overview
SQL Server 2008 OverviewDavid Chou
 
New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012 New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012 Richie Rump
 

Viewers also liked (7)

Intro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionIntro to T-SQL – 2nd session
Intro to T-SQL – 2nd session
 
Writing and optimizing T-SQL
Writing and optimizing T-SQLWriting and optimizing T-SQL
Writing and optimizing T-SQL
 
SQL Server 2008 Overview
SQL Server 2008 OverviewSQL Server 2008 Overview
SQL Server 2008 Overview
 
Using T-SQL
Using T-SQL Using T-SQL
Using T-SQL
 
New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012 New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012
 
Sql Basics And Advanced
Sql Basics And AdvancedSql Basics And Advanced
Sql Basics And Advanced
 
T-SQL Overview
T-SQL OverviewT-SQL Overview
T-SQL Overview
 

Similar to Top 5 T-SQL Improvements in SQL Server 2014

Top 5 T-SQL Improvements in SQL Server 2014
Top 5 T-SQL Improvements in SQL Server 2014Top 5 T-SQL Improvements in SQL Server 2014
Top 5 T-SQL Improvements in SQL Server 2014Boris Hristov
 
Database Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceDatabase Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceEdwin M Sarmiento
 
SharePoint 2010 database maintenance
SharePoint 2010 database maintenanceSharePoint 2010 database maintenance
SharePoint 2010 database maintenanceMatt Ranlett
 
Mike walsh hadr_toomanychoices_20191107
Mike walsh hadr_toomanychoices_20191107Mike walsh hadr_toomanychoices_20191107
Mike walsh hadr_toomanychoices_20191107Mike Walsh
 
Storing and managing your content in share point spsnyc
Storing and managing your content in share point spsnycStoring and managing your content in share point spsnyc
Storing and managing your content in share point spsnycBaris Bruce Tuncertan
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsSteve Knutson
 
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
 
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
 
Top 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerTop 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerKevin Kline
 
SharePoint Storage Best Practices
SharePoint Storage Best PracticesSharePoint Storage Best Practices
SharePoint Storage Best PracticesMark Ginnebaugh
 
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...Datavail
 
Monitoring sql server
Monitoring sql serverMonitoring sql server
Monitoring sql serverJohn Martin
 
14 Tips for Planning ECM Content Migration to SharePoint
14 Tips for Planning ECM Content Migration to SharePoint14 Tips for Planning ECM Content Migration to SharePoint
14 Tips for Planning ECM Content Migration to SharePointJoel Oleson
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Knut Relbe-Moe [MVP, MCT]
 
Sentri SharePoint Performance webinar
Sentri SharePoint Performance webinarSentri SharePoint Performance webinar
Sentri SharePoint Performance webinarSentri
 
Backup is not Backup, Restore is Backup SPSCincy 2012
Backup is not Backup, Restore is Backup   SPSCincy 2012Backup is not Backup, Restore is Backup   SPSCincy 2012
Backup is not Backup, Restore is Backup SPSCincy 2012John Ferringer
 
Tips for managing a VLDB
Tips for managing a VLDBTips for managing a VLDB
Tips for managing a VLDBJohn Martin
 
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endSPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endKnut Relbe-Moe [MVP, MCT]
 

Similar to Top 5 T-SQL Improvements in SQL Server 2014 (20)

Top 5 T-SQL Improvements in SQL Server 2014
Top 5 T-SQL Improvements in SQL Server 2014Top 5 T-SQL Improvements in SQL Server 2014
Top 5 T-SQL Improvements in SQL Server 2014
 
Database Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceDatabase Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 Performance
 
Let's get along
Let's get alongLet's get along
Let's get along
 
SharePoint 2010 database maintenance
SharePoint 2010 database maintenanceSharePoint 2010 database maintenance
SharePoint 2010 database maintenance
 
Mike walsh hadr_toomanychoices_20191107
Mike walsh hadr_toomanychoices_20191107Mike walsh hadr_toomanychoices_20191107
Mike walsh hadr_toomanychoices_20191107
 
Storing and managing your content in share point spsnyc
Storing and managing your content in share point spsnycStoring and managing your content in share point spsnyc
Storing and managing your content in share point spsnyc
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAs
 
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
 
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...
 
Top 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerTop 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL Server
 
SharePoint Storage Best Practices
SharePoint Storage Best PracticesSharePoint Storage Best Practices
SharePoint Storage Best Practices
 
To blob or not to blob
To blob or not to blobTo blob or not to blob
To blob or not to blob
 
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
Collaborate 2018: Optimizing Your Robust Oracle EBS Footprint for Radical Eff...
 
Monitoring sql server
Monitoring sql serverMonitoring sql server
Monitoring sql server
 
14 Tips for Planning ECM Content Migration to SharePoint
14 Tips for Planning ECM Content Migration to SharePoint14 Tips for Planning ECM Content Migration to SharePoint
14 Tips for Planning ECM Content Migration to SharePoint
 
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...
 
Sentri SharePoint Performance webinar
Sentri SharePoint Performance webinarSentri SharePoint Performance webinar
Sentri SharePoint Performance webinar
 
Backup is not Backup, Restore is Backup SPSCincy 2012
Backup is not Backup, Restore is Backup   SPSCincy 2012Backup is not Backup, Restore is Backup   SPSCincy 2012
Backup is not Backup, Restore is Backup SPSCincy 2012
 
Tips for managing a VLDB
Tips for managing a VLDBTips for managing a VLDB
Tips for managing a VLDB
 
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back endSPSMadrid Get sql spinning with SharePoint. Best practice for the back end
SPSMadrid Get sql spinning with SharePoint. Best practice for the back end
 

More from Boris Hristov

The Secret to Engaging Presentations
The Secret to Engaging PresentationsThe Secret to Engaging Presentations
The Secret to Engaging PresentationsBoris Hristov
 
Presentation Design Fundamentals
Presentation Design FundamentalsPresentation Design Fundamentals
Presentation Design FundamentalsBoris Hristov
 
The World of Business Intelligence
The World of Business IntelligenceThe World of Business Intelligence
The World of Business IntelligenceBoris Hristov
 
Securing SQL Azure DB? How?
Securing SQL Azure DB? How?Securing SQL Azure DB? How?
Securing SQL Azure DB? How?Boris Hristov
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!Boris Hristov
 
How to Deliver Technical Presentations: The Right Way!
How to Deliver Technical Presentations: The Right Way!How to Deliver Technical Presentations: The Right Way!
How to Deliver Technical Presentations: The Right Way!Boris Hristov
 
Securing SQL Azure DB? How?
Securing SQL Azure DB? How?Securing SQL Azure DB? How?
Securing SQL Azure DB? How?Boris Hristov
 
Presentation Skills: The Next Level
Presentation Skills: The Next LevelPresentation Skills: The Next Level
Presentation Skills: The Next LevelBoris Hristov
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!Boris Hristov
 
BI PoC for the Telco Industry
BI PoC for the Telco IndustryBI PoC for the Telco Industry
BI PoC for the Telco IndustryBoris Hristov
 
Presentation Design Basics
Presentation Design BasicsPresentation Design Basics
Presentation Design BasicsBoris Hristov
 
Deep Into Isolation Levels
Deep Into Isolation LevelsDeep Into Isolation Levels
Deep Into Isolation LevelsBoris Hristov
 
Database Transactions and SQL Server Concurrency
Database Transactions and SQL Server ConcurrencyDatabase Transactions and SQL Server Concurrency
Database Transactions and SQL Server ConcurrencyBoris Hristov
 
Database Performance
Database PerformanceDatabase Performance
Database PerformanceBoris Hristov
 
You want rules? You need Policy-Based Management!
You want rules? You need Policy-Based Management!You want rules? You need Policy-Based Management!
You want rules? You need Policy-Based Management!Boris Hristov
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!Boris Hristov
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!Boris Hristov
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!Boris Hristov
 
The Nightmare of Locking, Blocking and Isolation Levels
The Nightmare of Locking, Blocking and Isolation LevelsThe Nightmare of Locking, Blocking and Isolation Levels
The Nightmare of Locking, Blocking and Isolation LevelsBoris Hristov
 
Welcome to the nightmare of locking, blocking and isolation levels!
Welcome to the nightmare of locking, blocking and isolation levels!Welcome to the nightmare of locking, blocking and isolation levels!
Welcome to the nightmare of locking, blocking and isolation levels!Boris Hristov
 

More from Boris Hristov (20)

The Secret to Engaging Presentations
The Secret to Engaging PresentationsThe Secret to Engaging Presentations
The Secret to Engaging Presentations
 
Presentation Design Fundamentals
Presentation Design FundamentalsPresentation Design Fundamentals
Presentation Design Fundamentals
 
The World of Business Intelligence
The World of Business IntelligenceThe World of Business Intelligence
The World of Business Intelligence
 
Securing SQL Azure DB? How?
Securing SQL Azure DB? How?Securing SQL Azure DB? How?
Securing SQL Azure DB? How?
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!
 
How to Deliver Technical Presentations: The Right Way!
How to Deliver Technical Presentations: The Right Way!How to Deliver Technical Presentations: The Right Way!
How to Deliver Technical Presentations: The Right Way!
 
Securing SQL Azure DB? How?
Securing SQL Azure DB? How?Securing SQL Azure DB? How?
Securing SQL Azure DB? How?
 
Presentation Skills: The Next Level
Presentation Skills: The Next LevelPresentation Skills: The Next Level
Presentation Skills: The Next Level
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!
 
BI PoC for the Telco Industry
BI PoC for the Telco IndustryBI PoC for the Telco Industry
BI PoC for the Telco Industry
 
Presentation Design Basics
Presentation Design BasicsPresentation Design Basics
Presentation Design Basics
 
Deep Into Isolation Levels
Deep Into Isolation LevelsDeep Into Isolation Levels
Deep Into Isolation Levels
 
Database Transactions and SQL Server Concurrency
Database Transactions and SQL Server ConcurrencyDatabase Transactions and SQL Server Concurrency
Database Transactions and SQL Server Concurrency
 
Database Performance
Database PerformanceDatabase Performance
Database Performance
 
You want rules? You need Policy-Based Management!
You want rules? You need Policy-Based Management!You want rules? You need Policy-Based Management!
You want rules? You need Policy-Based Management!
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!
 
The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!The Nightmare of Locking, Blocking and Isolation Levels!
The Nightmare of Locking, Blocking and Isolation Levels!
 
The Nightmare of Locking, Blocking and Isolation Levels
The Nightmare of Locking, Blocking and Isolation LevelsThe Nightmare of Locking, Blocking and Isolation Levels
The Nightmare of Locking, Blocking and Isolation Levels
 
Welcome to the nightmare of locking, blocking and isolation levels!
Welcome to the nightmare of locking, blocking and isolation levels!Welcome to the nightmare of locking, blocking and isolation levels!
Welcome to the nightmare of locking, blocking and isolation levels!
 

Recently uploaded

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 

Recently uploaded (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Top 5 T-SQL Improvements in SQL Server 2014

Editor's Notes

  1. Поздрав и благодарности, че все още сте тук за последната сесия? Уморени ли сте вече много? Нали знаете как се говори само за 1 – 2 неща, които са ключови. Иска ми се да ви разкажа и определено да ви покажа 5 други, които определено могат да ви помогнат в ежедневието ви за това да направите приложенията ви по – добри. Така казано...
  2. Ценя времето ви и искам да ви кажа, че ако сте дошли за това или Clustered Columnstore индекси – няма да чуете нищо. Както и няма да е вери дийп сесия, защото за всяко от нещата, които ще видите може да се изнесе отделна такава (а и все пак е последна сесия, предпочитам да енджойнете) Прекалено нови неща, за които още няма почти никаква информация в интернет или поне толкова колкото би ни се искало.
  3. Казвам се Борис Христов и работя като Senior SQL Server DBA за HP В същото време съм Автор за Pluralsight SQL Server MVP съм, което означава, че може да ме видите или чуете да говоря доста често както тук, така и на доста събития в цяла европа Не на последноя място се занимавам и с обчения и със SQL Hangouts
  4. Да се захващаме
  5. Така ще протече като последното е интересно и ще е нестандартно. + НАГРАДИТЕ!
  6. Колко от вас са чували това? Standard Edition на продукта... Change tracking and change data capture All transactions with change tracking are fully durable. A transaction has the change tracking property if it does any write operations to tables that are enabled for either change tracking or change data capture (CDC). Crash recovery Consistency is guaranteed, but some changes from delayed durable transactions that have committed may be lost. Cross-database and DTC If a transaction is cross-database or distributed, if is fully durable, regardless of any database or transaction commit setting. Always On Availability Groups and MirroringDelayed durable transactions do not guarantee any durability on either the primary or any of the secondaries. In addition, they do not guarantee any knowledge about the transaction at the secondary. After commit, control is returned to the client before any acknowledgement is received from any synchronous secondary. Failover clustering Some delayed durable transaction writes might be lost. Transaction Replication Delayed durable transactions do not guarantee their replication. Transactions are only replicated after they have been made durable. Log shipping Only transactions that have been made durable are included in the log that is shipped. Log Backup Only transactions that have been made durable are included in the backup.
  7. Всяка една система като SQL Server ни дава възможност да контролираме тези 4. Atomic – Error handling and how we use it Consistent – Foreign keys, check constraints, triggers, validation rules. Isolated – locking, isolation levels Durable – Кой се грижи за това? transaction log – rolling back and forward Нека се фокусираме върху последното. Как „преминава“ една транзакция?
  8. Transaction starts -> data is modified in the memory and changes are constantly (sync) send to the log. Once we commit the change and we have all the log records on the log we return the control.  W-A-L – Write ahead logging механизъм ЧУДЕСНО! Какво става ако вие сте написали невероятно приложение, но дисковете ви са бавни (за тлога)? Ами ... Започвате да виждате, че нещо тези инсърти / ъпдейти и т.н не минават така бързо както ви се иска
  9. When you say to the DBAs it’s slow here is what they see.
  10. Wouldn’t it be interesting if… 60 KB buffer -> flush Sp_flush_log Durable transaction – MSDTC or Cross database
  11. THERE IS NO ACID ANYMORE!
  12. Locks are same, just released faster Ways to flush – sp_flushes, durable transaction or 60KB log buffer full
  13. Колко отвас използват SELECT INTO? Колко от вас са чували, че има подобрения за него в 2014?
  14. Подобрението е доста, доста простичко...
  15. За да можете да извлечете максимума от паралелизма. Пример със ССД-то 7 секунди вместо 18.
  16. How many of you have heard about this improvement? What is – QE assignes costs to each plan and the one with lowest cost is choosen. Those costs are actually how many rows are we going to be proceeded for each operator and that’s the work of the cardinality estimator Talk about the problem – slow queries in general
  17. Under estimation – disk spills, serial plans, bad indexes chosen or join orders Over estimation – more memory assigned, parallel plan and not serial So, what is a cardinality estimator? A cardinality estimator is the component of the query processor whose job is to estimate the number of rows returned by relational operations in a query. This information, along with some other data, is used by the query optimizer to select an efficient execution plan. Cardinality estimation is inherently inexact, as it is a mathematical model which relies on statistical information. It is also based on several assumptions which, although not documented, have been known over the years – some of them include the uniformity, independence, containment and inclusion assumptions. A brief description of these assumptions follows. Uniformity. Used when the distribution for an attribute is unknown, for example, inside of range rows in a histogram step or when a histogram is not available. Independence. – сямтаме, че данните в колоните са независими освен ако изрично не е казано, че те са. Containment. Смятаме че ако нещо се търси значи съществува. Inclusion. Когато имаме where x = нещо – нещото винаги съществува и стойността му е точно такава, каквато я имаме в хистограмата на статистиките. Stats: Density – the uniqnes of a column Histogram – data distribution
  18. А също така е и доста комплексна задача. Изчисленията, които трябва да прави CE трябва да „правилни“ за почти всички клиенти на Майкрософт...
  19. Statistics on ascending or descending key columns, such as IDENTITY or real-time timestamp columns, might require more frequent statistics updates than the query optimizer performs. Insert operations append new values to ascending or descending columns. The number of rows added might be too small to trigger a statistics update. If statistics are not up-to-date and queries select from the most recently added rows, the current statistics will not have cardinality estimates for these new values. This can result in inaccurate cardinality estimates and slow query performance. For example, a query that selects from the most recent sales order dates will have inaccurate cardinality estimates if the statistics are not updated to include cardinality estimates for the most recent sales order dates. Trace flags 2389 + 2390 With one predicate – no difference except if there are no outdated statistics. If they are the new will consider the total number of rows and the old will consider the statistics With more than one – it considers that they are correlated and calculates it in a different way In Joins – quite better (with column joining). With more than one column – new CE underestimates a lot! With joins with multiple tables and multiple columns there could be even changes in the execution plans! For modulo % - very good! X
  20. Sys.dm_exec_query_profiles_dynamic + query_optimizer_estimate_cardinality
  21. Stats are per partition. Can be updated per partition. 20% rule applies on partition level now!
  22. http://www.sqlpassion.at/archive/2013/06/27/improved-temp-table-caching-in-sql-server-2014/
  23. SQL Server 2014 има достатъчн оподобрения, които