The document provides an agenda for a presentation on SQL Server 2014 In-Memory OLTP. The topics covered include basics of In-Memory OLTP, creating databases and memory optimized tables, indexing memory optimized tables, accessing tables, limitations, and analysis/migration tools. Code examples are provided for creating databases, tables, indexes, and stored procedures for In-Memory OLTP.
Slow Database in your PHP stack? Don't blame the DBA!Harald Zeitlhofer
Your users complain about the bad performance of your app or website? Developers blame the database? How can we find the cause for the performance hotspot?
Far too often the database is held responsible for performance or scalability problems. It seems to be main contributor to the overall web request response time. However, in many cases it’s not the database itself, but the way, how the application is using the database! Too many database statements, inefficient queries and poor index selection are among the common problem patterns.
Based on real life examples, you will learn how to approach performance problems, how to figure out if the database is really to blame and how to end the finger pointing between developers and DBAs.
Slides from my talk at PHP conference Asia 2016 in Singapore
As any engineer will tell you, choosing a database for your next great project is an important but challenging step , as it’s hard to anticipate exactly where your project roadmap will lead you. Switching databases is even harder and while we are able to choose the right tool for each task, you then end up with several database solutions to maintain.
What if there was a product that was hybrid enough to suit multiple workloads? While there is a grain of truth in the “jack of all trades, master of none” expression, after a recent deep-dive into the Apache Ignite database we may have that “master of all” database. In this Meetup, led by DoiT International Staff Cloud Architect Zaar Hai, we will explore together to find out.
And finally, does it run on Kubernetes?
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
Is my MySQL server configured properly? Should I run Community MySQL, MariaDB, Percona or WebScaleSQL? How many innodb buffer pool instances should I run? Why should I NOT use the query cache? How do I size the innodb log file size and what IS that innodb log anyway? All answers are inside.
Aurimas Mikalauskas is a former Percona performance consultant and architect currently writing and teaching at speedemy.com. He's been involved with MySQL since 1999, scaling and optimizing MySQL backed systems since 2004 for companies such as BBC, EngineYard, famous social networks and small shops like EstanteVirtual, Pine Cove and hundreds of others.
Additional content mentioned in the presentation can be found here: http://speedemy.com/17
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014serge luca
Tuning SQL Server for SharePoint 2013-Sharepoint Summit toronto 2014 - Serge Luca (SharePoint MVP) and Isabelle Van Campenhoudt(SQ Server MVP); ShareQL, Belgium
SQL Server 2014 Extreme Transaction Processing (Hekaton) - BasicsTony Rogerson
Far from Hekaton being an extension of DBCC PINTABLE, it’s a huge new piece of functionality that can significantly improve the scalability of various data based scenarios – not just OLTP but also ETL and real-time BI.
This session will introduce Hekaton features, how and when to use it; it will be demo led giving Hekaton end-to-end: enabling it, create tables, index design, query considerations, native stored procedures, durability [or not], introduce methods of identifying what to put in memory or not.
Slow Database in your PHP stack? Don't blame the DBA!Harald Zeitlhofer
Your users complain about the bad performance of your app or website? Developers blame the database? How can we find the cause for the performance hotspot?
Far too often the database is held responsible for performance or scalability problems. It seems to be main contributor to the overall web request response time. However, in many cases it’s not the database itself, but the way, how the application is using the database! Too many database statements, inefficient queries and poor index selection are among the common problem patterns.
Based on real life examples, you will learn how to approach performance problems, how to figure out if the database is really to blame and how to end the finger pointing between developers and DBAs.
Slides from my talk at PHP conference Asia 2016 in Singapore
As any engineer will tell you, choosing a database for your next great project is an important but challenging step , as it’s hard to anticipate exactly where your project roadmap will lead you. Switching databases is even harder and while we are able to choose the right tool for each task, you then end up with several database solutions to maintain.
What if there was a product that was hybrid enough to suit multiple workloads? While there is a grain of truth in the “jack of all trades, master of none” expression, after a recent deep-dive into the Apache Ignite database we may have that “master of all” database. In this Meetup, led by DoiT International Staff Cloud Architect Zaar Hai, we will explore together to find out.
And finally, does it run on Kubernetes?
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
Is my MySQL server configured properly? Should I run Community MySQL, MariaDB, Percona or WebScaleSQL? How many innodb buffer pool instances should I run? Why should I NOT use the query cache? How do I size the innodb log file size and what IS that innodb log anyway? All answers are inside.
Aurimas Mikalauskas is a former Percona performance consultant and architect currently writing and teaching at speedemy.com. He's been involved with MySQL since 1999, scaling and optimizing MySQL backed systems since 2004 for companies such as BBC, EngineYard, famous social networks and small shops like EstanteVirtual, Pine Cove and hundreds of others.
Additional content mentioned in the presentation can be found here: http://speedemy.com/17
Tuning SQL Server for Sharepoint-Sharepoint Summit Toronto 2014serge luca
Tuning SQL Server for SharePoint 2013-Sharepoint Summit toronto 2014 - Serge Luca (SharePoint MVP) and Isabelle Van Campenhoudt(SQ Server MVP); ShareQL, Belgium
SQL Server 2014 Extreme Transaction Processing (Hekaton) - BasicsTony Rogerson
Far from Hekaton being an extension of DBCC PINTABLE, it’s a huge new piece of functionality that can significantly improve the scalability of various data based scenarios – not just OLTP but also ETL and real-time BI.
This session will introduce Hekaton features, how and when to use it; it will be demo led giving Hekaton end-to-end: enabling it, create tables, index design, query considerations, native stored procedures, durability [or not], introduce methods of identifying what to put in memory or not.
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Knut Relbe-Moe [MVP, MCT]
Performance problems in SharePoint are most commonly caused by a poorly configured or ineffectively optimized SQL Server back end. More often than not, the SQL Server is not installed following Best Practice guidelines. In this fast-paced session, Chief Technical Architect and International speaker Knut Relbe-Moe will walk you through his top 13 tips for ensuring your SQL back end is perfectly configured and performing well for SharePoint. If you want to ensure that your SharePoint environment is great whether it's in Azure or on premises, this is the session for you to join.
MySQL Performance Tuning: The Perfect Scalability (OOW2019)Mirko Ortensi
“When data grows, MySQL multiplies.” When data grows, a standard configuration does not fit anymore. This hands-on lab walks through the ways MySQL has to adapt to an ever-increasing amount of data in context of tuning, under the heading “multiplication”:
—Scaling up through partitioning and how partitioning can help manage/archive data
—How to relocate binlog, undo, redo, tablespaces, and more on different mount points to take advantage of multiple storages
—All improvements to parallel slave replication
—A quick OS approach, to verify swapping and affinity tuning take the most out of the machine.
MySQL® 5.7 is a great release which has a lot to offer, especially in the development and replication areas. It provides a lot of new optimizer features for developers to take advantage of, a much more powerful GIS function and high performance JSON data type, allowing for a more powerful store for semi-structured data. It also features dramatically improved Performance Schema, Parallel and Multi-Source replication, allowing you to scale much further than ever before, just to give you a taste. In this webinar, we will provide an overview of the most important MySQL 5.7 features.
This webinar will be part of a 3-part series which will include MySQL 5.7 for Developers and MySQL 5.7 for DBAs.
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerIDERA Software
You can watch the replay for this Geek Sync webcast in the IDERA Resource Center: http://ow.ly/S6MG50A5ok5
Microsoft introduced IN-MEMORY OLTP, widely referred to as “Hekaton” in SQL Server 2014. Hekaton allows for the creation of fully transactionally consistent memory-resident tables designed for high concurrency and no blocking. With SQL 2016, many of the original restrictions and limitations of this feature have been reduced. IDERA’s Vicky Harp will give an overview of this feature, including how to compile T-SQL code into machine code for an even greater performance boost.
There’s also been a lot of buzz about Oracle 12c’s new IN-MEMORY COLUMN STORE. Oracle ACE Bert Scalzo will cover this new feature, how it works, it’s benefits, scripts to measure/monitor it and more. He will also touch on performance observations from benchmarking this new feature against more traditional SGA memory allocations plus Oracle 11g R2’s Database Smart Flash Cache. All findings, scripts and conclusions from this exercise will be shared. In addition, two very popular database benchmarking tools will be highlighted.
SharePoint is from Mars, SQL Server is from Venus (SQL Server for SharePoint ...Mark Broadbent
The SQL Server Database Engine is a prerequisite and fundamental part of any SharePoint deployment but the downside to all of this is the Database Server usually brings a Database Administrator with it. In this session we will explain how to configure SQL Server correctly with SharePoint deployments in mind, how the underlying architecture and mechanisms of SQL Server work and why you need to do all this! By the end of this session you will have learnt how to talk to your DBA to explain that they are doing it wrong!
Kentico offers a variety of levels at which you can cache content - This presentation goes over the methods of caching, how to implement them, and links to Kentico documentation for each process. This presentation has been confirmed to apply to Kentico versions 9-11
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software WebcastJoel Oleson
As we ramp up to SharePoint 2010, most still haven't done the basic things to get their systems and clients ready for the bits when they arrive. There is a lot that can be done today, and tools that have been shipped in SP2 to get us ready. Here's quick practical ways to use these tools with a quick rundown to getting prepared for SharePoint 2010
ORDS, the Oracle Rest Data Services, has evolved from just a supporting component of Oracle Application Express to the de facto standard tool for delivering RESTful API services for the Oracle database.
In this session we will cover
- what is Oracle Rest Data Services
- set up Oracle Rest Data Services to talk to your database
- use Oracle Rest Data Services to get data of all sorts in and out of your database
- create documentation for your API's
- secure the calls through Oracle Rest Data Services
In the end it will be clear, it is not magic.
It is the best way to get even more value out of your Oracle database!
This presentation will cover all the necessary steps to open up the information in your Autonomous database in the Cloud to the outside world - of course in a secure way.
ORDS nowadays is so sophisticated that most steps are extremely easy to do. It almost looks like magic!
En este diapositivas der Microsoft podemos ver qué aporta SQL 2014 en áreas como: Tablas optimizadas en memòria, Cambios en estimacion de la cardinalidad, Cifrado de los Backups, Mejoras en arquitectures, Always On, Cambios en Resource Governor, Data files en Azure.
Investigate SQL Server Memory Like Sherlock HolmesRichard Douglas
Memory is one part of the holy trinity of resources consumed by SQL Server, the others being CPU and disk. Most people know how to look at disk latency and throughput and then take remedial measures to fix those issues. But what about memory issues?
In this session, you will learn how SQL Server uses memory and various caches, how to gauge memory pressure, and how to address the significant problems it can cause.
You will leave with a much clearer understanding of how to monitor and manage memory consumption within SQL Server using native Dynamic Management Objects.
Unity Connect - Getting SQL Spinning with SharePoint - Best Practices for the...Knut Relbe-Moe [MVP, MCT]
Performance problems in SharePoint are most commonly caused by a poorly configured or ineffectively optimized SQL Server back end. More often than not, the SQL Server is not installed following Best Practice guidelines. In this fast-paced session, Chief Technical Architect and International speaker Knut Relbe-Moe will walk you through his top 13 tips for ensuring your SQL back end is perfectly configured and performing well for SharePoint. If you want to ensure that your SharePoint environment is great whether it's in Azure or on premises, this is the session for you to join.
MySQL Performance Tuning: The Perfect Scalability (OOW2019)Mirko Ortensi
“When data grows, MySQL multiplies.” When data grows, a standard configuration does not fit anymore. This hands-on lab walks through the ways MySQL has to adapt to an ever-increasing amount of data in context of tuning, under the heading “multiplication”:
—Scaling up through partitioning and how partitioning can help manage/archive data
—How to relocate binlog, undo, redo, tablespaces, and more on different mount points to take advantage of multiple storages
—All improvements to parallel slave replication
—A quick OS approach, to verify swapping and affinity tuning take the most out of the machine.
MySQL® 5.7 is a great release which has a lot to offer, especially in the development and replication areas. It provides a lot of new optimizer features for developers to take advantage of, a much more powerful GIS function and high performance JSON data type, allowing for a more powerful store for semi-structured data. It also features dramatically improved Performance Schema, Parallel and Multi-Source replication, allowing you to scale much further than ever before, just to give you a taste. In this webinar, we will provide an overview of the most important MySQL 5.7 features.
This webinar will be part of a 3-part series which will include MySQL 5.7 for Developers and MySQL 5.7 for DBAs.
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerIDERA Software
You can watch the replay for this Geek Sync webcast in the IDERA Resource Center: http://ow.ly/S6MG50A5ok5
Microsoft introduced IN-MEMORY OLTP, widely referred to as “Hekaton” in SQL Server 2014. Hekaton allows for the creation of fully transactionally consistent memory-resident tables designed for high concurrency and no blocking. With SQL 2016, many of the original restrictions and limitations of this feature have been reduced. IDERA’s Vicky Harp will give an overview of this feature, including how to compile T-SQL code into machine code for an even greater performance boost.
There’s also been a lot of buzz about Oracle 12c’s new IN-MEMORY COLUMN STORE. Oracle ACE Bert Scalzo will cover this new feature, how it works, it’s benefits, scripts to measure/monitor it and more. He will also touch on performance observations from benchmarking this new feature against more traditional SGA memory allocations plus Oracle 11g R2’s Database Smart Flash Cache. All findings, scripts and conclusions from this exercise will be shared. In addition, two very popular database benchmarking tools will be highlighted.
SharePoint is from Mars, SQL Server is from Venus (SQL Server for SharePoint ...Mark Broadbent
The SQL Server Database Engine is a prerequisite and fundamental part of any SharePoint deployment but the downside to all of this is the Database Server usually brings a Database Administrator with it. In this session we will explain how to configure SQL Server correctly with SharePoint deployments in mind, how the underlying architecture and mechanisms of SQL Server work and why you need to do all this! By the end of this session you will have learnt how to talk to your DBA to explain that they are doing it wrong!
Kentico offers a variety of levels at which you can cache content - This presentation goes over the methods of caching, how to implement them, and links to Kentico documentation for each process. This presentation has been confirmed to apply to Kentico versions 9-11
Preparing for Upgrade to SharePoint 2010 with Joel Oleson Quest Software WebcastJoel Oleson
As we ramp up to SharePoint 2010, most still haven't done the basic things to get their systems and clients ready for the bits when they arrive. There is a lot that can be done today, and tools that have been shipped in SP2 to get us ready. Here's quick practical ways to use these tools with a quick rundown to getting prepared for SharePoint 2010
ORDS, the Oracle Rest Data Services, has evolved from just a supporting component of Oracle Application Express to the de facto standard tool for delivering RESTful API services for the Oracle database.
In this session we will cover
- what is Oracle Rest Data Services
- set up Oracle Rest Data Services to talk to your database
- use Oracle Rest Data Services to get data of all sorts in and out of your database
- create documentation for your API's
- secure the calls through Oracle Rest Data Services
In the end it will be clear, it is not magic.
It is the best way to get even more value out of your Oracle database!
This presentation will cover all the necessary steps to open up the information in your Autonomous database in the Cloud to the outside world - of course in a secure way.
ORDS nowadays is so sophisticated that most steps are extremely easy to do. It almost looks like magic!
En este diapositivas der Microsoft podemos ver qué aporta SQL 2014 en áreas como: Tablas optimizadas en memòria, Cambios en estimacion de la cardinalidad, Cifrado de los Backups, Mejoras en arquitectures, Always On, Cambios en Resource Governor, Data files en Azure.
Investigate SQL Server Memory Like Sherlock HolmesRichard Douglas
Memory is one part of the holy trinity of resources consumed by SQL Server, the others being CPU and disk. Most people know how to look at disk latency and throughput and then take remedial measures to fix those issues. But what about memory issues?
In this session, you will learn how SQL Server uses memory and various caches, how to gauge memory pressure, and how to address the significant problems it can cause.
You will leave with a much clearer understanding of how to monitor and manage memory consumption within SQL Server using native Dynamic Management Objects.
MemSQL 201: Advanced Tips and Tricks WebcastSingleStore
Topics discussed include differences between columnstore and rowstore engines, data ingestion, data sharding and query tuning, lastly memory and workload management.
Watch the replay at https://memsql.wistia.com/medias/4siccvlorm
Caching and tuning fun for high scalability @ phpBenelux 2011Wim Godden
Slides for "Caching and Tuning fun for high scalability" talk, given @ phpBenelux Conference - Jan 28, 2011
Note that a lot of things were explained with each slide... that content is ofcourse not in the slides, so it might make some slides very unclear.
SQL Server 2014 for Developers (Cristian Lefter)ITCamp
There’s a special Microsoft product that has come a long way since its first OS/2 version. Actually this year, the 12th version of the product marks 25 years from the start, 25 years of Microsoft SQL Server.
Over the years, we have seen many amazing and innovative technologies such as SQL CLR, Service Broker, Resource Governor or recently the cloud-based version of SQL Server. And each time we concluded that we have seen it all, another version came to surprise us. SQL Server 2014 is no exception and I guarantee that some of its features will know your socks off!
I will say just “In-Memory OLTP” and “Updatable Clustered Columnstore Indexes” and it should be enough. But there’s more than that! Come to this session to find out for yourself!
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
2. About.Me()
• Veritabanı Yöneticisi / Doğan Online
• Eğitimen/Danışman / Btakademi
• Kitap Yazarı
• Microsoft Certified Trainer
ismailadar@hotmail.com
http://www.ismailadar.com
İsmail
Adar
@ismailadars
3. Content.GetAgenda()
• SQL Server 2014 In-Memory OLTP Basics
• Create Database For In-Memory OLTP
• Creating Memory Optimized Tables and Indexes
• Accessing Memory Optimized Tables
• Memory Optimized Tables Limitations
• Memory management on memory-optimized tables
• Tools for analysis and migration
9. Create Table DDL
Hash Index
CREATE TABLE [Customer](
BUCKET_COUNT 1-2X nr of
unique index key values
[CustomerID] INT NOT NULL
PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT = 1000000),
[Name] NVARCHAR(250) NOT NULL,
[CreatedDate] DATETIME NULL
INDEX [IX_CreatedDate] NONCLUSTERED
)
Indexes are specified inline
NONCLUSTERED indexes are
supported
WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA);
This table is memory
optimized
This table is durable
10. Memory Optimized Table Creation
CREATE TABLE DDL
Code generation and compilation
Table DLL produced
Table DLL loaded
12. Memory-Optimized Indexes
•
Exist only in memory
– Rebuilt on database startup
•
Do not contain data rows
– Indexes contain memory pointers to the data rows
– No duplication of data
– All indexes are covering
13. Memory-optimized Table: Row
Format
Row header
Payload (table columns)
8 bytes * (IdxLinkCount)
Begin Ts
End Ts
StmtId
IdxLinkCount
8 bytes
8 bytes
4 bytes
2 bytes
14. Memory Optimized Tables and Hash Indexes
Timestamps
Hash index on
Name
50, ∞
Chain ptrs
Name
City
Hash index on
City
Jane
Prague
100, ∞
John
Prague
90, ∞
90, 150
Susan
Bogota
15. Nonclustered (range) index
•
No latch for page updates
•
No in-place updates on index pages
•
1
PAGE
Physical
Page size- up to 8K. Sized to the row
•
Page Mapping Table
0
Handled thru delta pages or building new pages
Sibling pages linked one direction
Root
PAGE
2
1
0
3
2
0
•
2
8
Require two indexes for ASC/DSC
No covering columns (only the key is stored)
Page-pid-0
PageID-3
4
8
1
0
1
1
1
5
1
8
2
1
2
4
2
7
Non-leaf pages
Logical
1
14
15
2
200,
4
∞
5
1
Key
6
2
5
7
50, 300
2
Key
2
6
2
7
Data rows
leaf pages
18. Create Procedure DDL
CREATE PROCEDURE [dbo].[InsertOrder] @id INT, @date DATETIME
WITH
This proc is natively
compiled
NATIVE_COMPILATION,
SCHEMABINDING,
Native procs must be
schema-bound
EXECUTE AS OWNER
Execution context is
required
AS
BEGIN ATOMIC
WITH
Atomic blocks
• Create a transaction if
there is none
• Otherwise, create a
savepoint
(TRANSACTION
ISOLATION LEVEL = SNAPSHOT,
LANGUAGE = N'us_english')
-- insert T-SQL here
END
Session settings are fixed at
create time
19. Procedure Creation
CREATE PROC DDL
Query optimization
Code generation and compilation
Procedure DLL produced
Procedure DLL loaded
20. Accessing Memory Optimized Tables
Interpreted T-SQL Access
• Access both memory- and disk-based
tables
• Less performance
Natively Compiled Stored
Procs
• Access only memory optimized tables
• Maximum performance
• Limited T-SQL surface area
• Virtually full T-SQL surface
• When to use
– Ad hoc queries
– Reporting-style queries
– Speeding up app migration
• When to use
– OLTP-style operations
– Optimize performance critical business logic
24. Limitations on In-Memory OLTP in SQL 2014
• Tables
–
–
–
–
–
–
Triggers: no DDL/DML triggers
No Identity columns
Data types: no LOBs, no XML and no CLR data types
Constraints: no FOREIGN KEY and no CHECK constraints
No schema changes (ALTER TABLE) – need to drop/recreate table
No add/remove index – need to drop/recreate table
• Natively Compiled Stored Procedures
– No outer join, no OR, no subqueries, no CASE
– Limited built-in functions [core math, date/time, and string functions are
available]
25.
26. Memory Management For In-Memory OLTP
Data resides in memory at all times
• Must configure SQL server with sufficient memory to store memoryoptimized tables
• Failure to allocate memory will fail transactional workload at run-time
• Integrated with SQL Server memory manager and reacts to memory
pressure for GC (Garbage Collection)
27. Memory Management For In-Memory
OLTP
Integrated with Resource Governor
• To ensure performance stability for disk-based table workloads
• “Bind” a database to a resource pool
• Mem-opt tables in a database cannot exceed the limit of the resource
pool
• Hard top limit (80% of phys. memory) to ensure system remains stable
under memory pressure
28. Memory Management For In-Memory OLTP
Memory optimized max
memory limit
CREATE RESOURCE POOL InMemResourcePool
WITH (MAX_MEMORY_PERCENT=40);
ALTER RESOURCE GOVERNOR RECONFIGURE;
GO
EXEC sp_xtp_bind_db_resource_pool 'InMemoryDemoDB','InMemResourcePool';
GO
ALTER DATABASE InMemoryDemoDB SET OFFLINE;
ALTER DATABASE InMemoryDemoDB SET ONLINE;
Filegroup for memory optimized
table storage
Talking points:* Main target scenario is high throughput OLTP; other scenarios include ETL, read scale-up (many concurrent transactions reading same data), and burst insert/update (i.e., batches of updates, interfering with read workload)Memory optimized data structuresNovel data structures – no Btree and no PINTABLEUse new structures such as hash indexesTables reside in memoryIndexes exist only in memoryTables are still fully durable – there is a copy of the data on disk for crash recovery purposesNative compilationT-SQL Stored procedures are compiled to native code as DLLsAllows more efficient query execution by reducing the CPU cycles required for each operationLatch- and lock-free data structuresTable structures are multi-versioned. This is built right into the data structures, no tempdb usageData structures are latch free – row updates are realized by inserting new row versionsNo locks, thus no blocking. Transactional consistency is guaranteed through multi-versioning and conflict detectionIntegration in SQL ServerUse the same familiar T-SQL syntax for creating memory optimized tables and natively compiled stored procedures
Talking points:The code page of a (var)char value is determined by the collation associated with the value. For example, the collation SQL_Latin1_General_CP1_CI_AS has the associated code page 1252.-- all supported collations for (var)char columns in memory-optimized tables select * from sys.fn_helpcollations() where collationproperty(name, 'codepage') = 1252;Indexes can only be created on string columns if they use a BIN2 collation. The LastName variable uses BIN2 collation. FirstName uses the database default, which is CI_AS (case-insensitive, accent-sensitive).select * from sys.fn_helpcollations() where name like '%BIN2'
Talking points:* Hash indexes are good for point lookups; need bucket countRange indexes are in the plan; you can think of a range index as a kind of nonclustered index, except that it is memory optimized and latch-free – no bucket-count requiredLike hash indexes, range indexes will be inherently coveringAlter table is not pertimmited
Talking points:This diagram shows what happens when a table is createdTables are compiled for efficient access to table data – knowledge about indexes, columns, datatypes, etc, is baked into the DLLDLL is loaded immediately after compilationDLL is recompiled at server startup, so no risk of anyone tampering with the DLLs while the server is down
Talking points:* Hash indexes are good for point lookups; need bucket countRange indexes are in the plan; you can think of a range index as a kind of nonclustered index, except that it is memory optimized and latch-free – no bucket-count requiredLike hash indexes, range indexes will be inherently covering
Talking points:This diagram shows what happens when a table is createdTables are compiled for more efficient access to table data – knowledge about indexes, columns, datatypes, etc, is baked into the DLLDLL is loaded immediately after compilationDLL is recompiled at server startup, so no risk of anyone tampering with the DLLs while the server is down
Starting SQL “14”, SQL Server has both memory optimized and disk-based tablesThe familiar interpreted T-SQL can be used to access bothHekaton introduces natively compiled stored procedures for efficient access to memory optimized tables, and efficient business logic executionCan access only memory optimized tablesMachine code in DLLs can access the table and index structures directly; machine code requires fewer CPU cycles to execute the queries than the SQL Server query execution engine, interpreting the query execution plan Because most query operators and functions need to be re-implemented for native procs, we have limitations in the query surface area in native procs. For example, no OR, no subqueries, and we will have a limited number of built-in functionsWhile interpreted T-SQL is less performant, there is more flexibility:1. can use ad hoc batches2. no restrictions on T-SQL surface area3. can access both memory optimized and disk-based tables in the same queryWith interop there is still the benefit of latch-free data structuresInterop limitations – No Cursors (except for static readonly cursors, API cursors), table sample, MERGE with memory optimized table as targetYou can start with interop, and over time move to natively compiled stored procedures.
Talking points:The code page of a (var)char value is determined by the collation associated with the value. For example, the collation SQL_Latin1_General_CP1_CI_AS has the associated code page 1252.-- all supported collations for (var)char columns in memory-optimized tables select * from sys.fn_helpcollations() where collationproperty(name, 'codepage') = 1252;Indexes can only be created on string columns if they use a BIN2 collation. The LastName variable uses BIN2 collation. FirstName uses the database default, which is CI_AS (case-insensitive, accent-sensitive).select * from sys.fn_helpcollations() where name like '%BIN2'