SlideShare ist ein Scribd-Unternehmen logo
1 von 14
SQL Server 2014
Delayed Durability
Davide Mauri
dmauri@solidq.com
PILLS SPONSORS
Davide Mauri
18 Years of experience on the SQL Server Platform
Specialized in Data Solution Architecture, Database
Design, Performance Tuning, Business Intelligence
Projects, Consulting, Mentoring & Training
Regular Speaker @ SQL Server events
Microsoft SQL Server MVP
President of UGISS (Italian SQL Server UG)
Mentor @ SolidQ
Delayed Durability
E’ una delle più importanti novità di SQL Server 2014
Ottimale per tabelle «di appoggio»
Quindi in particolare per le fasi ETL di una soluzione di
BI

Non fa «notizia» ma è una killer feature!
Delayed Durability
«D» nell’ancronimo ACID
Atomicity
(atomicità)
Consistency
(consistenza)
Isolation
(isolamento)
Durability
(persistenza)
Proprietà di una Transazione, per assicurare la correttezza
logica e fisica della stessa
http://en.wikipedia.org/wiki/ACID
Delayed Durability
La persistenza viene ottenuta attraverso l’uso del
Transaction Log
Le transazione seguono il pattern Write-Ahead Logging
(WAL)
Ossia, prima le transazioni vengono scritte nel t-log
E solo successivamente vengono scritte nei data file
Delayed Durability
Il WAL è una garanzia ed una sicurezza.
Ma anche un evidente collo di bottiglia, dato che tutto
deve passare da li
Anche il log sta in memoria, ma al commit deve essere
scritto su disco, prima di poter terminare la transazione.
Si parla quindi di «synchronous commit»
Delayed Durability
Con SQL Server 2014 il WAL può essere bypassato! 
«Asynchronous Commit»
La transazione può essere terminata senza avere la
conferma che il buffer log sia stato scritto sul disco
Notevole incremento del throughput!
Attenzione che si possono perdere i dati!
E mai più recuperarli…..
Delayed Durability
L’opzione per bypassare il WAL è la seguente:

La Delayed Transaction Durability (DTD) è utilizzabile sia
con Hekaton che con tabelle/transazioni «classiche»
Delayed Durability
Se l’opzione è «FORCED» la DTD viene attivata su tutto il
database
Quindi molta attenzione…
Se l’opzione è «ALLOWED» è possibile attivare la DTD
transazione per transazione
Grandissima granularità nell’applicazione della DTD! 
Il TEMPDB è sempre stato in DTD (sin dalla versione 2000)
Delayed Durability
DTD a livello di transazione:
Delayed Durability
Delayed Durability
In conclusione…
Utilizzare DTD dove serve per migliorare notevolmente le
performance di scrittura
Ricordate comunque che le operazione BULK sono sempre
le più veloci
Attenzione ad usarlo con cautela per evitare di perdere dati
non «committati»!
Grazie!
Trovi altri video su:
www.ugiss.org/sql-server-2014pills

Weitere ähnliche Inhalte

Ähnlich wie Delayed durability

DDive2011 - Performance on Lotus Domino
DDive2011 - Performance on Lotus DominoDDive2011 - Performance on Lotus Domino
DDive2011 - Performance on Lotus DominoGTTech
 
ATEN - Gestire i server: sempre e ovunque
ATEN - Gestire i server: sempre e ovunqueATEN - Gestire i server: sempre e ovunque
ATEN - Gestire i server: sempre e ovunqueATEN Infotech
 
SQL Azure - The Basics
SQL Azure - The BasicsSQL Azure - The Basics
SQL Azure - The BasicsDavide Mauri
 
Doaw2020 - Dalla produzione alla QA, provisioning su SQL Server
Doaw2020 - Dalla produzione alla QA, provisioning su SQL ServerDoaw2020 - Dalla produzione alla QA, provisioning su SQL Server
Doaw2020 - Dalla produzione alla QA, provisioning su SQL ServerAlessandro Alpi
 
Yashi Enterprise e Microsoft Perchè aggiornare a windows server 2012 r2
Yashi Enterprise e Microsoft Perchè aggiornare a windows server 2012 r2Yashi Enterprise e Microsoft Perchè aggiornare a windows server 2012 r2
Yashi Enterprise e Microsoft Perchè aggiornare a windows server 2012 r2Yashi Italia
 
Dalla Unified Communication & Collaboration alla Virtualizzazione: le opportu...
Dalla Unified Communication & Collaboration alla Virtualizzazione: le opportu...Dalla Unified Communication & Collaboration alla Virtualizzazione: le opportu...
Dalla Unified Communication & Collaboration alla Virtualizzazione: le opportu...festival ICT 2016
 
Open Source Day 2015 - DBaaS con Docker: un caso di studio
Open Source Day 2015 - DBaaS con Docker: un caso di studioOpen Source Day 2015 - DBaaS con Docker: un caso di studio
Open Source Day 2015 - DBaaS con Docker: un caso di studioPar-Tec S.p.A.
 
Aruba, Dell e Intel: una partnership d'eccezione
Aruba, Dell e Intel: una partnership d'eccezioneAruba, Dell e Intel: una partnership d'eccezione
Aruba, Dell e Intel: una partnership d'eccezioneAruba S.p.A.
 
Virtualizzare Nanosoft
Virtualizzare   NanosoftVirtualizzare   Nanosoft
Virtualizzare NanosoftDario Vemagi
 
Jc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno FluidtimeJc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno FluidtimeAntonio Terreno
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL DatabaseEmanuele Zanchettin
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft FabricMarco Pozzan
 
Reingeneering digital library
Reingeneering digital libraryReingeneering digital library
Reingeneering digital librarySimoneMadoni
 
VMUGIT - Virtualizzare con i piedi per terra
VMUGIT - Virtualizzare con i piedi per terraVMUGIT - Virtualizzare con i piedi per terra
VMUGIT - Virtualizzare con i piedi per terraVMUG IT
 
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terraPresentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terraAndrea Mauro
 
Cose un cat_tool
Cose un cat_toolCose un cat_tool
Cose un cat_toolKarenVacca
 
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSsparkfabrik
 
Applicazioni Serverless con AWS
Applicazioni Serverless con AWSApplicazioni Serverless con AWS
Applicazioni Serverless con AWSsparkfabrik
 

Ähnlich wie Delayed durability (20)

DDive2011 - Performance on Lotus Domino
DDive2011 - Performance on Lotus DominoDDive2011 - Performance on Lotus Domino
DDive2011 - Performance on Lotus Domino
 
ATEN - Gestire i server: sempre e ovunque
ATEN - Gestire i server: sempre e ovunqueATEN - Gestire i server: sempre e ovunque
ATEN - Gestire i server: sempre e ovunque
 
SQL Azure - The Basics
SQL Azure - The BasicsSQL Azure - The Basics
SQL Azure - The Basics
 
Doaw2020 - Dalla produzione alla QA, provisioning su SQL Server
Doaw2020 - Dalla produzione alla QA, provisioning su SQL ServerDoaw2020 - Dalla produzione alla QA, provisioning su SQL Server
Doaw2020 - Dalla produzione alla QA, provisioning su SQL Server
 
Yashi Enterprise e Microsoft Perchè aggiornare a windows server 2012 r2
Yashi Enterprise e Microsoft Perchè aggiornare a windows server 2012 r2Yashi Enterprise e Microsoft Perchè aggiornare a windows server 2012 r2
Yashi Enterprise e Microsoft Perchè aggiornare a windows server 2012 r2
 
Dalla Unified Communication & Collaboration alla Virtualizzazione: le opportu...
Dalla Unified Communication & Collaboration alla Virtualizzazione: le opportu...Dalla Unified Communication & Collaboration alla Virtualizzazione: le opportu...
Dalla Unified Communication & Collaboration alla Virtualizzazione: le opportu...
 
Open Source Day 2015 - DBaaS con Docker: un caso di studio
Open Source Day 2015 - DBaaS con Docker: un caso di studioOpen Source Day 2015 - DBaaS con Docker: un caso di studio
Open Source Day 2015 - DBaaS con Docker: un caso di studio
 
Aruba, Dell e Intel: una partnership d'eccezione
Aruba, Dell e Intel: una partnership d'eccezioneAruba, Dell e Intel: una partnership d'eccezione
Aruba, Dell e Intel: una partnership d'eccezione
 
Virtualizzare Nanosoft
Virtualizzare   NanosoftVirtualizzare   Nanosoft
Virtualizzare Nanosoft
 
Jc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno FluidtimeJc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno Fluidtime
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
 
#dd12 panagenda the value of transparency - it
#dd12 panagenda   the value of transparency - it#dd12 panagenda   the value of transparency - it
#dd12 panagenda the value of transparency - it
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft Fabric
 
Reingeneering digital library
Reingeneering digital libraryReingeneering digital library
Reingeneering digital library
 
VMUGIT - Virtualizzare con i piedi per terra
VMUGIT - Virtualizzare con i piedi per terraVMUGIT - Virtualizzare con i piedi per terra
VMUGIT - Virtualizzare con i piedi per terra
 
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terraPresentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
 
Cose un cat_tool
Cose un cat_toolCose un cat_tool
Cose un cat_tool
 
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWS
 
Safe check up - cos'è? - 22feb2012
Safe check up - cos'è? - 22feb2012 Safe check up - cos'è? - 22feb2012
Safe check up - cos'è? - 22feb2012
 
Applicazioni Serverless con AWS
Applicazioni Serverless con AWSApplicazioni Serverless con AWS
Applicazioni Serverless con AWS
 

Mehr von Davide Mauri

Azure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstartAzure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstartDavide Mauri
 
Agile Data Warehousing
Agile Data WarehousingAgile Data Warehousing
Agile Data WarehousingDavide Mauri
 
Dapper: the microORM that will change your life
Dapper: the microORM that will change your lifeDapper: the microORM that will change your life
Dapper: the microORM that will change your lifeDavide Mauri
 
When indexes are not enough
When indexes are not enoughWhen indexes are not enough
When indexes are not enoughDavide Mauri
 
Building a Real-Time IoT monitoring application with Azure
Building a Real-Time IoT monitoring application with AzureBuilding a Real-Time IoT monitoring application with Azure
Building a Real-Time IoT monitoring application with AzureDavide Mauri
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveDavide Mauri
 
Azure SQL & SQL Server 2016 JSON
Azure SQL & SQL Server 2016 JSONAzure SQL & SQL Server 2016 JSON
Azure SQL & SQL Server 2016 JSONDavide Mauri
 
SQL Server & SQL Azure Temporal Tables - V2
SQL Server & SQL Azure Temporal Tables - V2SQL Server & SQL Azure Temporal Tables - V2
SQL Server & SQL Azure Temporal Tables - V2Davide Mauri
 
SQL Server 2016 What's New For Developers
SQL Server 2016  What's New For DevelopersSQL Server 2016  What's New For Developers
SQL Server 2016 What's New For DevelopersDavide Mauri
 
Azure Stream Analytics
Azure Stream AnalyticsAzure Stream Analytics
Azure Stream AnalyticsDavide Mauri
 
Azure Machine Learning
Azure Machine LearningAzure Machine Learning
Azure Machine LearningDavide Mauri
 
Dashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BIDashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BIDavide Mauri
 
Azure ML: from basic to integration with custom applications
Azure ML: from basic to integration with custom applicationsAzure ML: from basic to integration with custom applications
Azure ML: from basic to integration with custom applicationsDavide Mauri
 
Event Hub & Azure Stream Analytics
Event Hub & Azure Stream AnalyticsEvent Hub & Azure Stream Analytics
Event Hub & Azure Stream AnalyticsDavide Mauri
 
SQL Server 2016 JSON
SQL Server 2016 JSONSQL Server 2016 JSON
SQL Server 2016 JSONDavide Mauri
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveDavide Mauri
 
Real Time Power BI
Real Time Power BIReal Time Power BI
Real Time Power BIDavide Mauri
 
AzureML - Creating and Using Machine Learning Solutions (Italian)
AzureML - Creating and Using Machine Learning Solutions (Italian)AzureML - Creating and Using Machine Learning Solutions (Italian)
AzureML - Creating and Using Machine Learning Solutions (Italian)Davide Mauri
 
Datarace: IoT e Big Data (Italian)
Datarace: IoT e Big Data (Italian)Datarace: IoT e Big Data (Italian)
Datarace: IoT e Big Data (Italian)Davide Mauri
 
Azure Machine Learning (Italian)
Azure Machine Learning (Italian)Azure Machine Learning (Italian)
Azure Machine Learning (Italian)Davide Mauri
 

Mehr von Davide Mauri (20)

Azure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstartAzure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstart
 
Agile Data Warehousing
Agile Data WarehousingAgile Data Warehousing
Agile Data Warehousing
 
Dapper: the microORM that will change your life
Dapper: the microORM that will change your lifeDapper: the microORM that will change your life
Dapper: the microORM that will change your life
 
When indexes are not enough
When indexes are not enoughWhen indexes are not enough
When indexes are not enough
 
Building a Real-Time IoT monitoring application with Azure
Building a Real-Time IoT monitoring application with AzureBuilding a Real-Time IoT monitoring application with Azure
Building a Real-Time IoT monitoring application with Azure
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
Azure SQL & SQL Server 2016 JSON
Azure SQL & SQL Server 2016 JSONAzure SQL & SQL Server 2016 JSON
Azure SQL & SQL Server 2016 JSON
 
SQL Server & SQL Azure Temporal Tables - V2
SQL Server & SQL Azure Temporal Tables - V2SQL Server & SQL Azure Temporal Tables - V2
SQL Server & SQL Azure Temporal Tables - V2
 
SQL Server 2016 What's New For Developers
SQL Server 2016  What's New For DevelopersSQL Server 2016  What's New For Developers
SQL Server 2016 What's New For Developers
 
Azure Stream Analytics
Azure Stream AnalyticsAzure Stream Analytics
Azure Stream Analytics
 
Azure Machine Learning
Azure Machine LearningAzure Machine Learning
Azure Machine Learning
 
Dashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BIDashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BI
 
Azure ML: from basic to integration with custom applications
Azure ML: from basic to integration with custom applicationsAzure ML: from basic to integration with custom applications
Azure ML: from basic to integration with custom applications
 
Event Hub & Azure Stream Analytics
Event Hub & Azure Stream AnalyticsEvent Hub & Azure Stream Analytics
Event Hub & Azure Stream Analytics
 
SQL Server 2016 JSON
SQL Server 2016 JSONSQL Server 2016 JSON
SQL Server 2016 JSON
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
Real Time Power BI
Real Time Power BIReal Time Power BI
Real Time Power BI
 
AzureML - Creating and Using Machine Learning Solutions (Italian)
AzureML - Creating and Using Machine Learning Solutions (Italian)AzureML - Creating and Using Machine Learning Solutions (Italian)
AzureML - Creating and Using Machine Learning Solutions (Italian)
 
Datarace: IoT e Big Data (Italian)
Datarace: IoT e Big Data (Italian)Datarace: IoT e Big Data (Italian)
Datarace: IoT e Big Data (Italian)
 
Azure Machine Learning (Italian)
Azure Machine Learning (Italian)Azure Machine Learning (Italian)
Azure Machine Learning (Italian)
 

Delayed durability

  • 1. SQL Server 2014 Delayed Durability Davide Mauri dmauri@solidq.com
  • 3. Davide Mauri 18 Years of experience on the SQL Server Platform Specialized in Data Solution Architecture, Database Design, Performance Tuning, Business Intelligence Projects, Consulting, Mentoring & Training Regular Speaker @ SQL Server events Microsoft SQL Server MVP President of UGISS (Italian SQL Server UG) Mentor @ SolidQ
  • 4. Delayed Durability E’ una delle più importanti novità di SQL Server 2014 Ottimale per tabelle «di appoggio» Quindi in particolare per le fasi ETL di una soluzione di BI Non fa «notizia» ma è una killer feature!
  • 5. Delayed Durability «D» nell’ancronimo ACID Atomicity (atomicità) Consistency (consistenza) Isolation (isolamento) Durability (persistenza) Proprietà di una Transazione, per assicurare la correttezza logica e fisica della stessa http://en.wikipedia.org/wiki/ACID
  • 6. Delayed Durability La persistenza viene ottenuta attraverso l’uso del Transaction Log Le transazione seguono il pattern Write-Ahead Logging (WAL) Ossia, prima le transazioni vengono scritte nel t-log E solo successivamente vengono scritte nei data file
  • 7. Delayed Durability Il WAL è una garanzia ed una sicurezza. Ma anche un evidente collo di bottiglia, dato che tutto deve passare da li Anche il log sta in memoria, ma al commit deve essere scritto su disco, prima di poter terminare la transazione. Si parla quindi di «synchronous commit»
  • 8. Delayed Durability Con SQL Server 2014 il WAL può essere bypassato!  «Asynchronous Commit» La transazione può essere terminata senza avere la conferma che il buffer log sia stato scritto sul disco Notevole incremento del throughput! Attenzione che si possono perdere i dati! E mai più recuperarli…..
  • 9. Delayed Durability L’opzione per bypassare il WAL è la seguente: La Delayed Transaction Durability (DTD) è utilizzabile sia con Hekaton che con tabelle/transazioni «classiche»
  • 10. Delayed Durability Se l’opzione è «FORCED» la DTD viene attivata su tutto il database Quindi molta attenzione… Se l’opzione è «ALLOWED» è possibile attivare la DTD transazione per transazione Grandissima granularità nell’applicazione della DTD!  Il TEMPDB è sempre stato in DTD (sin dalla versione 2000)
  • 11. Delayed Durability DTD a livello di transazione:
  • 13. Delayed Durability In conclusione… Utilizzare DTD dove serve per migliorare notevolmente le performance di scrittura Ricordate comunque che le operazione BULK sono sempre le più veloci Attenzione ad usarlo con cautela per evitare di perdere dati non «committati»!
  • 14. Grazie! Trovi altri video su: www.ugiss.org/sql-server-2014pills