sql server enterprise edition awareness

17
SQL SERVER ENTERPRISE AWARENESS By Hamid J. Fard Microsoft Certified Master: SQL Server 2008 Microsoft Certified Solutions Master: Charter-Data Platform CIW Database Design Specialist ghts © 2016 Fard Solutions Sdn Bhd, All rights reserved.

Upload: hamid-j-fard

Post on 12-Feb-2017

297 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Sql server enterprise edition awareness

SQL SERVER ENTERPRISE AWARENESS

By Hamid J. FardMicrosoft Certified Master: SQL Server 2008

Microsoft Certified Solutions Master: Charter-Data PlatformCIW Database Design Specialist

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

Page 2: Sql server enterprise edition awareness

Agenda• What Matters To You?• Do You Believe in High End Hardware?• SQL Server Enterprise Edition (Internal Features)

• 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

• Conclusion

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

Page 3: Sql server enterprise edition awareness

What Matters To You?

Manageability Performance Storage Space Disaster Recovery Cost

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

Page 4: Sql server enterprise edition awareness

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.

Page 5: Sql server enterprise edition awareness

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.

Page 6: Sql server enterprise edition awareness

Advance Scan (Marry-Go-Round)

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

Table A

Query A

User A

User B

SQL Server Optimizer Engine

ReadQuery Buffer

Query Buffer

Read

Query A

Query BufferRead

Page 7: Sql server enterprise edition awareness

Fast Recovery

Analysis Phase Redo Phase Undo Phase

Database Recovery Lifecycle

Database is AvailableBy Lock-Logging

Database is Under Recovery Uncommitted Transactions are Roll-Backed

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

Page 8: Sql server enterprise edition awareness

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.

Page 9: Sql server enterprise edition awareness

Single Scatter Scan

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

465

308

488

489

List o

f Lea

f Pag

es

Page 10: Sql server enterprise edition awareness

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.

Page 11: Sql server enterprise edition awareness

Role Reversal

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

Build Input

Probe Input

Hash MatchResultset

Page 12: Sql server enterprise edition awareness

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

Page 13: Sql server enterprise edition awareness

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%

Page 14: Sql server enterprise edition awareness

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

Page 15: Sql server enterprise edition awareness

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

Page 16: Sql server enterprise edition awareness

Vardecimal Storage Formatting

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

ID Full Name Savings1 John Smith 50,0002 Bill Gates 97,000,000,

0003 Kevin Wood 500

20 Bytes20 Bytes20 Bytes

ID Full Name Savings1 John Smith 50,0002 Bill Gates 97,000,000,

0003 Kevin Wood 500

5 Bytes20 Bytes5 Bytes

Page 17: Sql server enterprise edition awareness

Conclusion

If SQL Server Enterprise is Expensive, What About Other Editions!

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