Performance dreams of sql server 2014
-
Upload
shehap-elnagar -
Category
Technology
-
view
603 -
download
1
description
Transcript of Performance dreams of sql server 2014
![Page 1: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/1.jpg)
04/10/23 by Shehap El Nagar
![Page 2: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/2.jpg)
Shehap EL-Nagar
I am MVP,MCTS , MCITP SQL Server, I am DB consultant and Architect for lots of Banking, Telecom ,Ministries and governmental organizations all over Gulf ,also he has deep knowledge about T-SQL performance , HW Performance issues, Data Warehousing solutions , SQL Server Replication, Clustering solutions and Database Designs for different kinds of systems ...
The founder of the biggest SQL Server community all over the middle east http://sqlserver-performance-tuning.net/ , you can watch its success memories at http://www.youtube.com/user/ShehapElNagar
Moderator and author at http://www.sql-server-performance.com ,, the 1st SQL Server Author at MSDN Arabia http://msdn.microsoft.com/ar-sa/library/jj149119.aspx
, Speaker at SQL Saturday Events worldwide , local events at Saudi Arabia , many online events , more than 90 video tutorials and also many private sessions for .net developers and Database Administrators
And also influent participator at Microsoft Forums of SQL Server at http://social.technet.microsoft.com.More about him , you can find him on MVP Microsoft site http://mvp.microsoft.com/en-us/mvp/Shehap%20El-Nagar-5000188 .You can contact him at the below contacts :Mail :[email protected] ….Cellular phone :00966560700733
![Page 3: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/3.jpg)
First :Overhead look on new SQL Server 2014 features
• Definition • Architectural design • Values and benefits• Caveats and recommendations• Demo
Third: Single Partition OIR , locks priority management
• Major Improvements outlines • Evolution from SQL Server 2000 to SQL Server 2014
Second :In Memory OLTP built in
Third :CCI (Clustered Columnstore Index)• Definition • Architectural design • Values and benefits• Caveats and recommendations• Demo
• Definition • Values and benefits• Demo
Fifth: New HW Resources supported and IO Resource Governor
![Page 4: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/4.jpg)
First :Overhead look on new SQL Server 2014 features
![Page 5: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/5.jpg)
The Evolution of Microsoft Data Platform
SQL Server2000
SQL Server2005
SQL Server2008
SQL Server2008 R2
SQL Server2012
XML ● KPIs
Management Studio ● Mirroring
Compression ● Policy-Based Mgmt ● Programmability
PowerPivot ● SharePoint Integration ● Master Data Services
Always On ● ColumnStore Index ● Data Quality Services ● Power View ● Cloud Connectivity
SQL Server2014
In-Memory Across Workloads ● Performance & Scale ● Hybrid Cloud Optimized ● HDInsight ● Cloud BI
![Page 6: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/6.jpg)
0 211 8
0 1 4 0
69
53 53 55
34 2922 18
5
28 25 2921
6 120
16 169 8 6
43
20
43
0
20
40
60
80
2006 2007 2008 2009 2010 2011 2012 2013SQL Server Oracle MySQL DB2
Database Vulnerabilities
Secure
*National Institute of Standards and Technology Comprehensive Vulnerability Database 4/17/2013, Market share from IDC 2013
![Page 7: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/7.jpg)
![Page 8: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/8.jpg)
In-Memory OLTP10X-30X faster for new and existing SQL Server apps
Clustered column store indexUpdatable clustered columnstore index
Single Partition OIRSingle partitions for online index rebuild for a less impact
Locks priority ManagementDefine priority level and wait times for OIR for a less impact
Hardware scalableIO Resource Governor and more HW resources are supported
![Page 9: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/9.jpg)
First Myth: In Memory OLTP
![Page 10: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/10.jpg)
Architectural design Hekaton project to reduce the cost of query engine (35% delay) and access engine (45% delay)
Memory optimized tables are working on memory as streamlined
No page latch, no buffer pool , no lock manager like disk based table
They are supporting Natively compiled Stored procedures which are .dll entry points compiled to machine code using Visual C++ compilers
![Page 11: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/11.jpg)
SQL Server integration
• Same manageability, administration, and development experience
• Integrated queries and transactions
• Integrated HA and backup/restore
Main-memory optimized
• Indexes (hash and range) exist only in memory
• No buffer pool• The Highest
durability• Columns size
from 8060 bytes to 512 GB512 GB
High concurrency
• Multiversion optimistic concurrency control with full ACID support
• Core engine uses lock-free algorithms
• No lock manager, latches, or spinlocks
T-SQL compiled to machine code
• T-SQL compiled to machine code via Visual C compiler
• Invoking a procedure is just a DLL entry-point
• Aggressive optimizations at compile time
• No change whatsoever in your codein your codeSteadily declining
memory price, NVRAM
Many-core processors
Stalling CPU clock rate
TCO
Hardware trends Business
Hybrid engine and integrated
experience
High-performance
data operations
Frictionless scale-up
Efficient, business-logic
processing
In Memory OLTP benefits and values
![Page 12: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/12.jpg)
In Memory benefits and values
![Page 13: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/13.jpg)
Microsoft In-Memory Technologies
• In-Memory Analytics in PowerPivot for Excel
• In-Memory Analytics in SQL Server Analysis Services
• StreamInsight • In-Memory OLTP
• In-Memory Columnstore Index (in SQL Server 2014)
2014
2012
2014
2012
2014
![Page 14: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/14.jpg)
Caveats and Recommendations :•Identity and Sequence
•Foreign keys and constraints
•DML triggers
•Some columns types like BLOB columns as image and varbinar (ma), XML, ROWGuid, timestamp, text as well as ntext and CLR columns as hierarchyid,geography and geometry
•Data Compression and Clustered index but just only NONCLUSTERED HASH index
•Computed columns.
•Truncate option but just delete
•Table hints like with (nolock)..etc
•Alter natively compiled procedure is not supported but just you have to drop it and re-create it again•Natively compiled SPs don’t support merge commands
![Page 15: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/15.jpg)
Demo Part
![Page 16: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/16.jpg)
Second Myth: Clustered ColumnStore Index
![Page 17: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/17.jpg)
• Nonclustered column store indexes are based on xVelocity analytics engine and xVelocity columnstore index
• Store data in column-wise fashion
• Hekaton technique which is in contrast a
row-based technology
• CCI (Clustered column store index ) is a mix between Hekaton and xVelocity analytics engine and xVelocity columnstore index
• CCI is the table itself as CCI includes all columns
Architectural design
![Page 18: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/18.jpg)
• Columnstores: clustered and updatable No contradiction with DML as Data can be inserted, updated, or deleted
• Fast execution for data warehouse queries• Speedups of 10x -30x
• No need for separated base table• Saves space and Simpler management
• Eliminate need for other indexes• Saves space and simpler management
• More data types supported for batch mode execution• Removes many limitations from non-clustered columnstores in SQL
Server 2012
Benefits and values of CCI
![Page 19: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/19.jpg)
Benefits and values of CCIBatch Mode Row Mode
![Page 20: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/20.jpg)
Caveats and Recommendations :
•Foreign keys and constraints
•DML triggers
•Some columns types like BLOB columns as image and varbinar (max), XML, ROWGuid, timestamp, text as well as ntext and CLR columns as hierarchyid,geography and geometry
•Computed columns.
• Transactional replication nor peer to peer replication
![Page 21: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/21.jpg)
Demo Part
![Page 22: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/22.jpg)
Third Myth: Single Partition OIR and
locks priority management
![Page 23: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/23.jpg)
Definitions and terminologies
Managed Lock Priority is used for determining the lock priority of OIR (online index redbud) or switch partitions relatively to other end users transaction
Single Partition Online Index Rebuild is used to allow OIR for single partitions
![Page 24: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/24.jpg)
Benefits and values
• Increased concurrency and application availability
• Saving for throughput and thus resources such as CPU , Memory and IO
• Log space is reduced much coz not all tables are going to be rebuilt once a time but smaller chunks/partitions which permit for faster checkpoints
![Page 25: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/25.jpg)
Fourth Myth: New HW Resources supported
and IO Resource Governor
![Page 26: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/26.jpg)
New HW resources and IO Resource Governor
![Page 27: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/27.jpg)
Demo Part
![Page 28: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/28.jpg)
Q & APost your questions at:
http://www.sqlserver-performance-tuning.net/forums/
![Page 29: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/29.jpg)
04/10/23
Thank you ..See you again
![Page 30: Performance dreams of sql server 2014](https://reader038.fdocuments.in/reader038/viewer/2022103014/548c7911b47959190d8b635d/html5/thumbnails/30.jpg)