SlideShare a Scribd company logo
1 of 14
SQL SERVER & SQL AZURE
TEMPORAL TABLES
Davide Mauri
www.davidemauri.it | info@davidemauri.it
@mauridb
DAVIDE MAURI
 Microsoft Data Platform MVP since 2006
 Works with SQL Server from 6.5, on BI from 2003
 Specialized in Data SolutionArchitecture, Database Design, PerformanceTuning, High-
Performance DataWarehousing, BI, Big Data
 Very strong developer background
 Loves community!
 President of UGISS (Italian SQL Server UG) for 11Years, AppDevVG Leader since 2017
 Regular Speaker @ SQL Server events
 Director SW & Cloud @ Sensoria: http://www.sensoriafitness.com/
 E-mail: info@davidemauri.it -Twitter: @mauridb
 Blog: http://sqlblog.com/blogs/davide_mauri/default.aspx
LOVE AT FIRST SIGHT!
 TemporalTables
THINGSTO KEEP IN MIND
 Stored interval is half-open: [valid_from, valid_to)
 >= valid_fromAND < valid_to
 Stored interval is in UTC
TEMPORALTABLES
 Automatically keeps track of changed data (versioning)
 Along with period of validity
 Available in all editions of SQL Server (from the Express!)
 Available in SQL Azure
 ANSI 2011 compliant
 Provide native support for temporal queries
 Transparent to existing applications (if needed)
 Integrated with existing features (eg: Partitioning, Hekaton, ColumnStore)
 Integrated with new features (eg: Stretch Database)
TEMPORAL QUERIES
 SQL Server 2016 supports
 AS OF <date_time>
 FROM <start_date_time>TO <end_date_time>
 BETWEEN <start_date_time> AND <end_date_time>
 CONTAINED IN (<start_date_time> , <end_date_time>)
 ALL
 https://docs.microsoft.com/en-us/sql/relational-databases/tables/temporal-tables
http://www.ics.uci.edu/~alspaugh/cls/shr/allen.html
TEMPORALTABLES
 Some limitations compared to “classic” tables
 NoTRUNCATETABLE support
 INSTEADOF triggers not supported
 Temporal tables *can* be ALTERed
 A few limitations:
 Cannot add a computed columns
 Cannot add an Identity column
 Versioning can be turned on/off as we wish
TEMPORALTABLES
 SQL 2016:There is *no* automatic cleanup of versioning
 Stretch Database offer “a sort of” automatic archival (but still no cleaning!)
 Tips: https://msdn.microsoft.com/library/mt637341.aspx
 SQL vNext – Azure SQL:There *is* an automatic cleanup process of versioning
 https://docs.microsoft.com/en-us/azure/sql-database/sql-database-temporal-tables-
retention-policy
DEMO!
Let’s see some live action!
TEMPORALTABLES
 Temporal queries with other operators than “AS OF” can be tricky
 Especially if you’re joining temporal tables
 Rows are not unpacked and then packed back!
 Hugh Darwen http://www.dcs.warwick.ac.uk/~hugh/
DEMO!
Tricky stuff….
ADDITIONAL READS
 First Look at System-VersionedTemporalTables
 http://sqlmag.com/sql-server/first-look-system-versioned-temporal-tables-part-1-creating-
tables-and-modifying-data
 http://sqlmag.com/sql-server/first-look-system-versioned-temporal-tables-part-2-querying-
data-and-optimization-conside
 Usage Scenarios
 https://docs.microsoft.com/en-us/sql/relational-databases/tables/temporal-table-usage-
scenarios
 Temporal data (as a general topic)
 https://www.amazon.com/Time-Relational-Theory-Second-Management/dp/0128006315
 https://www.pluralsight.com/courses/working-with-temporal-data-sql-server
VOTE ON CONNECT
 Temporal support is good but can be improved! Help telling Microsoft you what
more:
 Add SQL Server Engine Support for Interval Queries (Intersection/Overlap and other
Allen’s interval algebra relations)
 https://connect.microsoft.com/SQLServer/Feedback/Details/780746
 TemporalTables: Connect Item Round Up
 http://sqlblog.com/blogs/adam_machanic/archive/2016/10/04/temporal-tables-connect-item-
round-up.aspx
THANKS!

More Related Content

What's hot

End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) Europe
Alexandre Morgaut
 
Community day 2013 applied architectures
Community day 2013   applied architecturesCommunity day 2013   applied architectures
Community day 2013 applied architectures
Panagiotis Kefalidis
 
SDEC2011 NoSQL Data modelling
SDEC2011 NoSQL Data modellingSDEC2011 NoSQL Data modelling
SDEC2011 NoSQL Data modelling
Korea Sdec
 

What's hot (20)

Azure Machine Learning
Azure Machine LearningAzure Machine Learning
Azure Machine Learning
 
Event Hub & Azure Stream Analytics
Event Hub & Azure Stream AnalyticsEvent Hub & Azure Stream Analytics
Event Hub & Azure Stream Analytics
 
Sql data base
Sql data baseSql data base
Sql data base
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
Debugging made easier with extended events
Debugging made easier with extended eventsDebugging made easier with extended events
Debugging made easier with extended events
 
Enhancements to High Availability, Disaster Recovery and Replication
Enhancements to High Availability, Disaster Recovery and ReplicationEnhancements to High Availability, Disaster Recovery and Replication
Enhancements to High Availability, Disaster Recovery and Replication
 
No Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with BootiqueNo Container: a Modern Java Stack with Bootique
No Container: a Modern Java Stack with Bootique
 
Iris Multi-Class Classifier with Azure ML
Iris Multi-Class Classifier with Azure MLIris Multi-Class Classifier with Azure ML
Iris Multi-Class Classifier with Azure ML
 
Always On Availability Group Troubleshooting Ninja
Always On Availability Group Troubleshooting Ninja Always On Availability Group Troubleshooting Ninja
Always On Availability Group Troubleshooting Ninja
 
Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2
 
Final project
Final projectFinal project
Final project
 
Optimizing Access with SQL Server
Optimizing Access with SQL ServerOptimizing Access with SQL Server
Optimizing Access with SQL Server
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) Europe
 
Community day 2013 applied architectures
Community day 2013   applied architecturesCommunity day 2013   applied architectures
Community day 2013 applied architectures
 
Role of-analytics-in-db as-life
Role of-analytics-in-db as-lifeRole of-analytics-in-db as-life
Role of-analytics-in-db as-life
 
Dangerous CSS
Dangerous CSSDangerous CSS
Dangerous CSS
 
SDEC2011 NoSQL Data modelling
SDEC2011 NoSQL Data modellingSDEC2011 NoSQL Data modelling
SDEC2011 NoSQL Data modelling
 
Debugging WordPress
Debugging WordPressDebugging WordPress
Debugging WordPress
 
Demystifying HTML5
Demystifying HTML5Demystifying HTML5
Demystifying HTML5
 
Spring.new hope.1.3
Spring.new hope.1.3Spring.new hope.1.3
Spring.new hope.1.3
 

Similar to SQL Server & SQL Azure Temporal Tables - V2

24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
SpanishPASSVC
 
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
Enter the Dragon -  SQL 2014 on Server Core PASS Summit 2014 EditionEnter the Dragon -  SQL 2014 on Server Core PASS Summit 2014 Edition
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
Mark Broadbent
 
Sql interview question part 4
Sql interview question part 4Sql interview question part 4
Sql interview question part 4
kaashiv1
 
Nishant_Saurabh_MS_SQL_SERVER_DBA
Nishant_Saurabh_MS_SQL_SERVER_DBANishant_Saurabh_MS_SQL_SERVER_DBA
Nishant_Saurabh_MS_SQL_SERVER_DBA
Nishant Saurabh
 

Similar to SQL Server & SQL Azure Temporal Tables - V2 (20)

Apoyo en la administración de bases de datos mediante microsoft data tools
Apoyo en la administración de bases de datos mediante microsoft data toolsApoyo en la administración de bases de datos mediante microsoft data tools
Apoyo en la administración de bases de datos mediante microsoft data tools
 
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars PlatzdaschAzure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
Azure Boot Camp 21.04.2018 SQL Server in Azure Iaas PaaS on-prem Lars Platzdasch
 
SQL Server 2016 new features
SQL Server 2016 new featuresSQL Server 2016 new features
SQL Server 2016 new features
 
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
24 HOP edición Español -Diferentes técnicas de administración de logins y usu...
 
Introduction to sql database on azure
Introduction to sql database on azureIntroduction to sql database on azure
Introduction to sql database on azure
 
SQL server 2016 New Features
SQL server 2016 New FeaturesSQL server 2016 New Features
SQL server 2016 New Features
 
Sql 2016 - What's New
Sql 2016 - What's NewSql 2016 - What's New
Sql 2016 - What's New
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2
 
Sql server 2016 Discovery Day
Sql server 2016 Discovery DaySql server 2016 Discovery Day
Sql server 2016 Discovery Day
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
 
A Primer To Sybase Iq Development July 13
A Primer To Sybase Iq Development July 13A Primer To Sybase Iq Development July 13
A Primer To Sybase Iq Development July 13
 
Alejandro_Laverdet - EN
Alejandro_Laverdet - ENAlejandro_Laverdet - EN
Alejandro_Laverdet - EN
 
Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016Live Query Statistics & Query Store in SQL Server 2016
Live Query Statistics & Query Store in SQL Server 2016
 
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
Enter the Dragon -  SQL 2014 on Server Core PASS Summit 2014 EditionEnter the Dragon -  SQL 2014 on Server Core PASS Summit 2014 Edition
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
 
Sql interview question part 4
Sql interview question part 4Sql interview question part 4
Sql interview question part 4
 
Ebook4
Ebook4Ebook4
Ebook4
 
Sql interview question part 4
Sql interview question part 4Sql interview question part 4
Sql interview question part 4
 
Nishant_Saurabh_MS_SQL_SERVER_DBA
Nishant_Saurabh_MS_SQL_SERVER_DBANishant_Saurabh_MS_SQL_SERVER_DBA
Nishant_Saurabh_MS_SQL_SERVER_DBA
 

More from Davide Mauri

Agile Data Warehousing
Agile Data WarehousingAgile Data Warehousing
Agile Data Warehousing
Davide Mauri
 

More from 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 Stream Analytics
Azure Stream AnalyticsAzure Stream Analytics
Azure Stream Analytics
 
Dashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BIDashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BI
 
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)
 
Back to the roots - SQL Server Indexing
Back to the roots - SQL Server IndexingBack to the roots - SQL Server Indexing
Back to the roots - SQL Server Indexing
 
BIML: BI to the next level
BIML: BI to the next levelBIML: BI to the next level
BIML: BI to the next level
 
Agile Data Warehousing
Agile Data WarehousingAgile Data Warehousing
Agile Data Warehousing
 
Data juice
Data juiceData juice
Data juice
 
Data Science Overview
Data Science OverviewData Science Overview
Data Science Overview
 
Delayed durability
Delayed durabilityDelayed durability
Delayed durability
 
Hekaton: In-memory tables
Hekaton: In-memory tablesHekaton: In-memory tables
Hekaton: In-memory tables
 
Hardware planning & sizing for sql server
Hardware planning & sizing for sql serverHardware planning & sizing for sql server
Hardware planning & sizing for sql server
 

Recently uploaded

Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
amitlee9823
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
amitlee9823
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 

Recently uploaded (20)

Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 

SQL Server & SQL Azure Temporal Tables - V2

  • 1. SQL SERVER & SQL AZURE TEMPORAL TABLES Davide Mauri www.davidemauri.it | info@davidemauri.it @mauridb
  • 2. DAVIDE MAURI  Microsoft Data Platform MVP since 2006  Works with SQL Server from 6.5, on BI from 2003  Specialized in Data SolutionArchitecture, Database Design, PerformanceTuning, High- Performance DataWarehousing, BI, Big Data  Very strong developer background  Loves community!  President of UGISS (Italian SQL Server UG) for 11Years, AppDevVG Leader since 2017  Regular Speaker @ SQL Server events  Director SW & Cloud @ Sensoria: http://www.sensoriafitness.com/  E-mail: info@davidemauri.it -Twitter: @mauridb  Blog: http://sqlblog.com/blogs/davide_mauri/default.aspx
  • 3. LOVE AT FIRST SIGHT!  TemporalTables
  • 4. THINGSTO KEEP IN MIND  Stored interval is half-open: [valid_from, valid_to)  >= valid_fromAND < valid_to  Stored interval is in UTC
  • 5. TEMPORALTABLES  Automatically keeps track of changed data (versioning)  Along with period of validity  Available in all editions of SQL Server (from the Express!)  Available in SQL Azure  ANSI 2011 compliant  Provide native support for temporal queries  Transparent to existing applications (if needed)  Integrated with existing features (eg: Partitioning, Hekaton, ColumnStore)  Integrated with new features (eg: Stretch Database)
  • 6. TEMPORAL QUERIES  SQL Server 2016 supports  AS OF <date_time>  FROM <start_date_time>TO <end_date_time>  BETWEEN <start_date_time> AND <end_date_time>  CONTAINED IN (<start_date_time> , <end_date_time>)  ALL  https://docs.microsoft.com/en-us/sql/relational-databases/tables/temporal-tables http://www.ics.uci.edu/~alspaugh/cls/shr/allen.html
  • 7. TEMPORALTABLES  Some limitations compared to “classic” tables  NoTRUNCATETABLE support  INSTEADOF triggers not supported  Temporal tables *can* be ALTERed  A few limitations:  Cannot add a computed columns  Cannot add an Identity column  Versioning can be turned on/off as we wish
  • 8. TEMPORALTABLES  SQL 2016:There is *no* automatic cleanup of versioning  Stretch Database offer “a sort of” automatic archival (but still no cleaning!)  Tips: https://msdn.microsoft.com/library/mt637341.aspx  SQL vNext – Azure SQL:There *is* an automatic cleanup process of versioning  https://docs.microsoft.com/en-us/azure/sql-database/sql-database-temporal-tables- retention-policy
  • 9. DEMO! Let’s see some live action!
  • 10. TEMPORALTABLES  Temporal queries with other operators than “AS OF” can be tricky  Especially if you’re joining temporal tables  Rows are not unpacked and then packed back!  Hugh Darwen http://www.dcs.warwick.ac.uk/~hugh/
  • 12. ADDITIONAL READS  First Look at System-VersionedTemporalTables  http://sqlmag.com/sql-server/first-look-system-versioned-temporal-tables-part-1-creating- tables-and-modifying-data  http://sqlmag.com/sql-server/first-look-system-versioned-temporal-tables-part-2-querying- data-and-optimization-conside  Usage Scenarios  https://docs.microsoft.com/en-us/sql/relational-databases/tables/temporal-table-usage- scenarios  Temporal data (as a general topic)  https://www.amazon.com/Time-Relational-Theory-Second-Management/dp/0128006315  https://www.pluralsight.com/courses/working-with-temporal-data-sql-server
  • 13. VOTE ON CONNECT  Temporal support is good but can be improved! Help telling Microsoft you what more:  Add SQL Server Engine Support for Interval Queries (Intersection/Overlap and other Allen’s interval algebra relations)  https://connect.microsoft.com/SQLServer/Feedback/Details/780746  TemporalTables: Connect Item Round Up  http://sqlblog.com/blogs/adam_machanic/archive/2016/10/04/temporal-tables-connect-item- round-up.aspx