sql server enterprise - download.microsoft.com server...sql server enterprise ... •alter...

Post on 09-Jun-2018

275 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

SQL SERVER ENTERPRISE AWARENESS

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

About MeHamid J. Fard

I am SQL Server Data Platform Expert with more than 9 years’ of professionalexperience, I am currently Microsoft Certified Master: SQL Server 2008,Microsoft Certified Solutions Master: Charter-Data Platform, Microsoft DataPlatform MVP and CIW Database Design Specialist. After a few years of being aproduction database administrator I jumped into the role of Data PlatformExpert. Being a consultant allows me to work directly with customers to helpsolve questions regarding database issues for SQL Server.

Agenda• What Matters To You?

• Do You Believe in High End Hardware?

• SQL Server Enterprise Edition (Internal Features)

• SQL Server 2016 Enterprise Edition New Features

• Questions and Answers

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

What Matters To You?

Manageability Performance Storage Space Disaster Recovery Cost

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Do You Believe in High End Hardware?

YES

NO

Without High End Software, Your High End Hardware Is Worthless.

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

SQL Server Internal Features vs. EditionsFeature Enterprise Standard

Advance Scan (Merry-Go-Round)

Fast Recovery

Prefetching

Single Scatter Scan

Automation Matching

Role Reversal

Partitioning

Data Compression

Deferred Transaction

Resource Governor

Vardecimal Storage Formatting

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Advance Scan (Marry-Go-Round)

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Table A

User A

User B

SQL Server Optimizer Engine

Query Buffer

Query Buffer

Query BufferRead

Fast Recovery

Analysis Phase Redo Phase Undo Phase

Database Recovery Lifecycle

Database is AvailableBy Lock-Logging

Database is Under Recovery Uncommitted Transactionsare Roll-Backed

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

PrefetchingSelect E.ID, E.FN, E.LN, D.Designation From Employee E Inner Join Designation D On E.Designation_ID = D.ID

Designation

Employee

Read Synchronously

Read Asynchronously

Project Resultset

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Single Scatter Scan

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

465

308

488

489

Lis

t o

f L

eaf

Pag

es

Automation MatchingCreate Table dbo.Test (ID Bigint, Batch Char(10), BatchID As Cast(ID As Char) + Batch Persisted)

Select ID, Batch From dbo.Test Where Cast ( ID As Char ) + Batch = ‘1045623’

Select ID, Batch From dbo.Test Where BatchID = ‘1045623’

Converts To

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Role Reversal

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Build Input

Probe Input

Hash MatchResultset

Partitioning

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Dbo.Sales2016-2017Filegroup 1

Dbo.Sales2015-2016Filegroup 2

Dbo.Sales2014-2015Filegroup 3

Query

Dbo.Sales

Data Compression

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

dbo.Sales1 Billion Rows186GB Data Size23,250,000,000,000 Data Pages

dbo.Sales1 Billion Rows108GB Data Size1,4557,760,000 Data Pages

Data Compression Up to 40%

Deferred Transaction

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

In Other Editions, A Corrupted Transaction Causes Database Startup To Fail

Analysis Phase Roll Forward Phase Roll Back Phase

Transaction Recovery Lifecycle

Transaction Uncommitted Transaction Not Rolled BackDue to Corrupted Transaction Log I/O

Resource Governor

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Memory: 64GBProcessor: 8 Logical Processor

DB_AMax Memory: 12GBMax Processor: 2 Logical ProcessorsMax IOPS: 500

DB_BMax Memory: 24GBMax Processor: 4 Logical ProcessorsMax IOPS: 2000

App A

App B

Vardecimal Storage Formatting

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

ID Full Name Savings

1 John Smith 50,000

2 Bill Gates 97,000,000,000

3 Kevin Wood 500

20 Bytes20 Bytes20 Bytes

ID Full Name Savings

1 John Smith 50,000

2 Bill Gates 97,000,000,000

3 Kevin Wood 500

5 Bytes20 Bytes5 Bytes

SQL SERVER 2016ENTERPRISE EDITION

NEW FEATURES

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Columnstore Index

• Batch execution for single-threaded queries.

• Snapshot isolation and read-committed snapshot isolation.

• Specify columnstore index when creating a table.

• AlwaysOn readable secondary supports updateable columnstore indexes.

• Updateable nonclustered columnstore index on heap or btree.

• Btree index on a clustered columnstore index.

• Columnstore index on a memory-optimized table. ***

• Nonclustered columnstore index definition supports using a filtered condition.

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

In-Memory OLTP• ALTER operations for memory-optimized tables & natively compiled stored

procedures.

• Use MARS connections to access memory-optimized tables and natively compiled stored procedures.

• Support for natively compiled, scalar user-defined functions.

• Complete support for collations (No more limited to code page 1252).

• Memory-Optimized Table size increase to 2TB.

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

What is In-Memory OLTP?

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

In-Memory Table

Disk Based Table

Benefits:• Eliminate contention.• Reduce logging.• Lower latency data retrieval.• Minimize code execution time.• Efficient data retrieval.• Optional IO reduction or removal, when

using non-durable tables

Implementation Scenarios:• High data insertion rate from multiple

concurrent connections.• Read performance and scale with periodic

batch inserts and updates.• Intensive business logic processing in the

database server.• Low latency.• Session state management.

In-Memory OLTP Components

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

In-MemoryPerformance

Memory-Optimized Table Requirements.

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Hardware Software

• X64 Architecture Processor• <60 Processor Cores• Enough Memory (x2 Table Size)• Enough Storage (x2 Table Size)• Processor Needs to Support cmpxchg16b

• X64 Architecture Edition• Enterprise or Developer Edition• Hyper-V to Support cmpxchg16b (If needed)• Enable Instant File Initialization

Memory Optimized Tables.

SQL Server CLR In-Memory Table

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Memory Optimized Indexes.

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Made for point lookups Made for range scans and ordered scans

In-Memory Query Processing

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Disk Based Query Plan SQL Server Query Processing for Disk-Based Tables

INTerpreted Transact-SQL Access to Memory-Optimized TablesMemory Optimized Query Plan

In-Memory Query Processing (Cont.)

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Native compilation of stored procedures

Execution of natively compiled stored procedures

In-Memory Transactions

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Lifetime of a transaction that accesses memory-optimized tables

Regular Processing Validation Phase Commit Processing

• Commit Dependency• Repeatable Read Validation• Serialization Validation

In-Memory Memory EstimationCREATE TABLE IMOLTP (col1 INT NOT NULL PRIMARY KEY NONCLUSTERED,col2 INT NOT NULL INDEX INDEX_1 HASH WITH (BUCKET_COUNT = 5000000),col3 INT NOT NULL INDEX INDEX_2 HASH WITH (BUCKET_COUNT = 5000000),col4 INT NOT NULL INDEX INDEX_3 HASH WITH (BUCKET_COUNT = 5000000),col5 INT NOT NULL INDEX INDEX_4 NONCLUSTERED,col6 CHAR (50) NOT NULL, col7 CHAR (50) NOT NULL, col8 CHAR (30) NOT NULL, col9 CHAR (50) NOT NULL)WITH (MEMORY_OPTIMIZED = ON)

Memory for Table: Timestamps + Index Pointers + Row Data => 24 + (8+8+8+8) + (4+4+4+4+4+50+50+30+50) => 256 x 5000000 => 1.28GB

Memory for Hash Indexes: Round Up Bucket Count x Index Pointer => 223 x 8 => 67,108,864 Bytes => 64MB x 3 => 192MB

Memory for Non-Clustered Index: (Index Pointer + SUM(Key Column Data Type Size)) x Unique Rows => (8 + 4) x 5000000 => 57MB

Memory for Row Versioning: (Longest Trans. Duration in Sec. x Peak No. of Row Updates & Deletes in Sec.) x Row Size=> ( 1 x 10) x 256 => 2560 Bytes => 2560 x (0.3 x 5000000) => 3.66GB

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

http://fard-solutions.com/sql-server-memory-table-size-estimation-script/

In-Memory Filegroup Configuration

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

In-Memory Data & Delta File Population

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Live Query Statistics

Query Store

Temporal Tables

JSON Format Query Result

Always Encrypted

Stretch DB

Row Level Security

Dynamic Data Masking

Questions and Answers

Copyrights © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Contact for Expert Advice

Copyrights © 2016 Fard Solutions Sdn Bhd, All Rights Reserved.

Fard Solutions Sdn Bhd1-1C, Incubator 1, Technology Park Malaysia, Bukit Jalil, 57000 Kuala Lumpur, Malaysia.

Tel: +603-89946788 - +603-79725433

Web: www.Fard-Solutions.com

Email: Enquiry@Fard-Solutions.com

Contact Us For 30 Minutes Free Consultation.

top related