34
(c) 2015 Independent SAP Technical User Group Annual Conference, 2015 ISUG - TECH 2015 Conference Storage Optimization and Operational Scalability in SAP ASE Vinod Chandran

Storage Optimization and Operational Simplicity in SAP Adaptive Server Enterprise

Embed Size (px)

Citation preview

Page 1: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ISUG-TECH 2015

Conference

Storage Optimization and Operational Scalability in SAP ASE

Vinod Chandran

Page 2: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Agenda

ASE 15.7 Highlights - Review of content for Storage Optimization and Operational Scalability

ASE 16.0 Review of content for Storage Optimization and Operational Scalability

Summary

Page 3: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Vinod Chandran

Vinod Chandran is a product expert in the product management team at SAP

representing ASE. As a senior member of the team, he has represented ASE for

19+ years in various roles during his career spanning 23+ years. He has a

master’s degree in electronics and computer science as well as a master’s degree

in business administration.

Page 4: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Key Storage Optimization and Operational Scalability Features in SAP ASE

• Shrink database ; Incremental Reorg ; Incremental backup

• Dynamic thread support ; Index compression ; Partition level locking ;

Multiple triggers

Page 5: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

ASE 15.7

Annual Conference, 2015

Page 6: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Application Development /Productivity

Large Data Sets

Operational Scalability / Lower TCO

Security

Performance / Scalability Mixed

Workloads

(Transactions & ODSS)

ASE 15.7 – High Level Overview

Page 7: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Application Development /Productivity

Large Data Sets

Operational Scalability / Lower TCO

Security

Performance / Scalability Mixed

Workloads

(Transactions & ODSS)

• LOB Management• User defined opt goals• Diagnostics & MDA enhancements• Compressed shared memory dumps

• Row / LOB Compression• In-row LOBs• DDLs with storage

optimizations• Expanded DB Size (64TB)• Async DB initialization• Partition merge/move/split

• Fully recoverable DDLs• Online utilities• Concurrent dump db & dump tran• Fast logged bcp• Granular permission

controls • Predicated privileges

• Kernel updates• Pre-computed result sets• Query plan sharing• Hash based update stats

In-market ASE 15.7 Highlights

Page 8: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Feature Description Highlight/Benefit

Reorg rebuild with online functionality

• Perform reorg rebuild online without blocking business operations

• Can be rolled back if there is a failure.• Increased data availability and decreased data disruption to business operations

Fast Logged BCP • Copies a database table to or from an operating system file in fast mode and fully logs the bcp

•Fully logged bcp provides full recovery• End-to-end replication works seamlessly• 75-80% increase in performance

Expanded DB Size • Max database size expanded to 64 TB compared to 32 TB earlier

• Supports VLDB requirement

Split/Merge /Move Partitions

• Split/Merge/Move partitions depending on business requirements or skewed data

• Redistribute data and make use of benefits of data partitions.

ASE features

Page 9: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Feature Description Highlight/Benefit

Online Index Creation • Index creation will not block data availability • Increased data availability offering concurrent access and DML on the affected table.

Support for parallel Index update

• Provide support of parallel index update to improve massive data inserts performance into tables with existing indexes

• Significant performance improvements

Enhanced insert-selectperformance

•Improve insert-select performance using bulk-mode .

• Improved performance•User applications do not have to be changed.•Flexible and added control to user.•Performance improvement to “select into” command and worktable population

ASE features Contd.

Page 10: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Application Development /Productivity

Large Data Sets

Operational Scalability / Lower TCO

HA/DR

Performance / Scalability Mixed

Workloads

(Transactions & ODSS)

• Diagnostics & MDA enhancements• Server-wide DML metrics• Instance level elapsed-time monitoring• Support for multiple scanner threads

for RepAgent

• Improve star-join performance

• BCP support for LOB• Improve performance while

handling LOB data• Incremental Reorg

• Enhanced insert-select performance

• Online Index Creation• Automated Point in time

recovery • Enhanced dump and load• Incremental Backup• Shrink Database

• HA/DR planned downtime• Planned failover of clients in

HA/DR environments

• Parallel Create index• Create index with hash stats

In-market ASE 15.7 Highlights Contd.

Page 11: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 15.7 ShrinkDB – : Remove a device

4GB database 3GB database

dbdev1 dbdev2 dbdev3 logdev dbdev1 dbdev3 logdev1GB 1GB 1Gb 1GB 1GB 1GB 1GB

demoDBdemoDB

alter database

demoDB OFF

dbdev2

Page 12: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 15.7 ShrinkDB – : Remove specified portion from device

4GB database 3.75GB database

dbdev1 dbdev2 dbdev3 logdev dbdev1 dbdev2 dbdev3 logdev

1GB 1GB 1GB 1GB 1GB 750MB 1GB 1GB

demoDBdemoDB

alter database

demoDB OFF

dbdev2=“250MB”

Page 13: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 15.7 ShrinkDB – Feature Syntax and Options

• Syntax for shrinking a database is:

alter database @dbname

OFF @device_name {=@size | [FROM @page] [TO @page]}

[,@device_name…..]

[with time=‘@time’]

[as background task]

OFF clause specifies the device name(s) from which space is to be released.

optional =@size modifier specifies the amount of space that is to be released from the database.

optional FROM modifier specifies the lowest-numbered logical page from which space is to be released.

optional TO modifier specifies the highest-numbered logical page from which space is to be released.

Qualifier “with time=‘@time’” specifies the maximum length of time the command may run.

Qualifier “as background task” specifies that the command will run in the background.

Page 14: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 15.7Incremental Reorg

reorg

rebuild

demo_tab

select *

from

demo_t

ab

demo_tab

EX_TAB

reorg

defrag

demo_tab

ASE Pages

select * from

demo_tab

EX_INT

demo_tab

DES

Shared Memory

EX_INT & EX_TABEX_INT

Page 15: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 15.7 Incremental Reorg– Feature Syntax and Options

• Syntax for de-fragmenting a table is:reorg defrag table_name[with {TIME=<hh:mm> | RESUME | SKIP_COMPACT_EXTENTS[=<pct-value>]} [{, {defrag_sub_clauses} }

….]where

defrag_sub_clauses :== {TIME = <hh:mm> | RESUME | SKIP_COMPACT_EXTENTS[ = <pct-value> ] } and pct-value :== {1-100}

‘time = <hh:mm>’ enables the utility reorganize the table or the list of data partitions for the specified interval of time and commit the operation.

‘resume’ enables the utility resume the reorganization of the table from the previous position of reorganization, that is, the data page that was last reorganized by previous invocation of the incremental reorg ended and continue till the entire table or list of partitions is reorganized.

‘resume’ used in conjunction with the option ‘time’ denotes that the reorganization of the table be resumed from the previous position of reorganization and run for the specified interval of time only.

Page 16: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 15.7 Incremental Backup

Page 17: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 15.7Incremental Backup

Page 18: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

ASE 16.0

Annual Conference, 2015

Page 19: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Application Development

/Productivity and driver support

Scale-up and Performance

Tools and TCO

Integrated HA/DR

Security and

AuditingMixed

Workloads

(Transactions & ODSS)

• CIS support for HANA• Resource usage with locators from JDBC• Full replication monitoring using

monitoring tables

• Linear Scale-up• Dynamic thread support• Index compression• Support for multiple triggers• Partition level locking• Raised db limits

• Compression Advisor• Scheduled database and

transaction backup• Sybrestore enhancements• SCC scalability• System configuration limit

alerts• Synchronous replication• Sync, async and near sync

replication

• Full database Encryption• Residual data remover• Full text audit

ASE 16.0 Feature Sets

Page 20: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 16.0 Index Compression

Why Index Compression?• Substantially reduce overall size of non-unique indexes and multi-column unique indexes• Index compression is different from data compression in following aspects:

• The index entries are sorted providing more flexibility in the compression design.

ASE Index Compression Strategies:– Only user table index will be compressed. – Index in system table/work table/temp tablewill not be compressed

Benefits• Potential for a cheaper execution plan• Lesser memory utilization

• Same amount of memory now can hold larger amount of index entries than non-compressed index pages.

• Minimized Resource Consumption• Less index pages to hold the same amount of data• Less locks needed for the same set of operations• Less I/O due to smaller footprint of compressed index pages

Page 21: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 16.0 Index Compression – Feature Syntax and Options

KEY POINTS

1. Supports index compression at a table, partition level

2. Can be enabled at a server, or session level

Creating an index compressed table

Syntax:create table [database.[owner.]]table_name

(column_name datatype

[default {constant_expression | user | null}]

WITH index_compression = {NONE | PAGE}

Defaultif no compression specification in the table,

then default is not to compress the index; other wise all indexes will be compressed

Alter index

Allow individual compression state of indexes to be modified

Alter index [database.[owner.]][table_name.index_name

Set index_compression [={none | page}]

Page 22: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Multiple Trigger Support - Overview

Usage Application modifications can be done non-intrusively

Add to existing trigger logic

New SQL syntax for ordering triggers create [or replace] trigger <trigger_name> on <table_name> for {insert | update | delete} order <integer> as

<trigger_body>

Example: Schema changes

New Customer Added to systemNew customer added to Billing Dept tableLater added to Marketing Dept table

Infrastructure changesAdd RTMS messaging via trigger without altering COTS vendor software supplied trigger code

Functionality Single/Multiple Sequencing

Pre-16.0 Single N/A

ASE 16 More than 1 trigger (max of 50) to fire as part of a single DML statement

Can be created for INSERT, UPDATE, DELETE

Can specify the ordering of the triggers

New

Customer Billing Marketing

INSERT

Non-Distruptive Development Using Multiple Triggers

INSERT

INSERT

Page 23: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 16.0 DB Limits – Feature

Limit Limit before 16.0 Limit as of 16.0

Number of tables allowed in a query.

50 user tables46 work tables

250 user tables46 work tables

Number of subqueries allowed in a query.

50 250

Number of columns allowed in an order by statement.

32 before 15.7 ESD 4.3200 as of 15.7 ESD 4.3

400

Page 24: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Partition Level Locking

Improve concurrency in

DML and DDL operations on a same table

Different DML operations on the same table

Previous Locking Model

Online operations such as truncate partition, alter table …move partition, etc. required exclusive access to the table

New Locking Model

With partition level locking, DML can concurrently operate on a table, while certain partition level online operations are running

Alter table … merge partition

Alter table .. .drop partition

Truncate partition, etc

These commands include the “with online” sub-clause, allowing them to allow concurrent access to table

Certain partition level operations can operate concurrently on different partitions of a table

Partition lock promotion can promote row/page locks to partition

P1 P2

DDL DML

Concurrent Access /

OperationsDML P2 DDL P2

DML P1 Maybe NO

DDL P1 NO NO

Concurrent Access /

OperationsDML P2 DDL P2

DML P1 YES YES

DDL P1 YES YES

Pre-ASE 16

ASE 16

Page 25: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 16.0 Partition Level Locking – Syntax and Options

• Table can be configured to use partition level locking using sp_chgattribute stored procedure:

• Partition Locking feature is disabled by default

1> create table orders (order_id int, order_info varchar(100))

2> partition by range (order_id)

3> ( P1 values <= (10000),

4> P2 values <= (20000),

5> P3 values <= (30000),

6> P4 values <= (MAX) )

7> go

1> sp_chgattribute orders, 'ptn_locking', 1

2> go

'ptn_locking' attribute of object 'orders' changed to 1.

(return status = 0)

1> sp_help orders

2> go

Name Owner Object_type Object_status Create_date

------------ ---------- ---------------------- ------------------------------------------------------------------------------------------ --------------------------------------

orders dbo user table keep first text page, partition level locking Feb 25 2014 6:45AM

partition_name partition_id compression_level pages row_count segment create_date

---------------------------- ------------------------ ---------------------------------- ---------- ------------------ -------------- --------------------------------------

P1 1304802449 none 1 0 default Feb 25 2014 6:45AM

P2 1320802506 none 1 0 default Feb 25 2014 6:45AM

P3 1352804045 none 1 0 default Feb 25 2014 6:45AM

P4 1368804102 none 1 0 default Feb 25 2014 6:45AM

Page 26: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

ASE 16.0 Dynamic Thread Support – Syntax and Options

• Allows execution of parallel query plans faster and with fewer resources• Dynamic thread assignment is applied to query plans generated for select queries.

• Dynamic thread assignment improves performance by:• Executing query plans in parallel with fewer threads (static thread assignment requires

serial query execution).• Executing dynamic load balancing between worker threads• Using existing semantic partitioning in joins more effectively. • Dynamic thread assignment allows a single worker thread to join the first partition of the

outer table to the first partition of the inner table, then re-executes the query plan fragment to join the second partition, and so on.

Page 27: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Application Development /Productivity

Large Data Sets

Operational Scalability / Lower TCO

HA/DR

Performance / Scalability Mixed

Workloads

(Transactions & ODSS)

• Diagnostics & MDA enhancements• Server-wide DML metrics• Instance level elapsed-time monitoring• Support for multiple scanner threads

for RepAgent

• Improve star-join performance

• BCP support for LOB• Improve performance while

handling LOB data• Incremental Reorg

• Enhanced insert-select performance

• Online Index Creation• Automated Point in time

recovery • Enhanced dump and load• Incremental Backup• Shrink Database

• HA/DR planned downtime• Planned failover of clients in

HA/DR environments

• Parallel Create index• Create index with hash stats

ASE 15.7 Feature Sets

Page 28: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Application Development

/Productivity and driver support

Scale-up and Performance

Tools and TCO

Integrated HA/DR

Security and

AuditingMixed

Workloads

(Transactions & ODSS)

• CIS support for HANA• Resource usage with locators from JDBC• Full replication monitoring using

monitoring tables

• Linear Scale-up• Dynamic thread support• Index compression• Support for multiple triggers• Partition level locking• Raised db limits

• Compression Advisor• Scheduled database and

transaction backup• Sybrestore enhancements• SCC scalability• System configuration limit

alerts

• Synchronous replication• Sync, async and near sync

replication

• Full database Encryption• Residual data remover• Full text audit

ASE 16.0 Feature Sets

Page 29: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Support for Developer Community

Developer Resource Description

Help with Programming Paradigms

Aid for understanding Sybase ASE behavior that may be different from other databases. Example, sample framework application with Spring MVC( Java stack)

New Samples and Tutorials Aid for new developers to Sybase ASE

Free ASE Developer download Full-featured Sybase ASE for development and testing in local/private environments

Documentation on common workarounds

Discuss Installation instructions, user error, configuration issues, etc. Location: http://scn.sap.com/community/developer-center/oltp-db/content?filterID=content~objecttype~objecttype%5Bdocument%5D

Forum for issue discussion and resolution

Location: http://scn.sap.com/community/developer-center/oltp-db/content?filterID=content~objecttype~objecttype%5Bthread%5D

Page 30: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

:

Sybase ASE Resources

For Developers:

http://scn.sap.com/community/developer-center/oltp-db

For Custom ASE Applications:

http://scn.sap.com/community/sybase-adaptive-server-enterprise

For SAP Business Suite on ASE:

http://scn.sap.com/community/sybase-ase

Page 31: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

1

2

3

Summary: ASE is a Superior Transactional Database Choice

Lower TCO – Efficient operations, optimized storage, leveraging power of eco-system

Transactional database of choice for custom and SAP Applications

Improved Performance, Scalability, Availability

4

ASE 16.0 new generation of ASE developed to address challenges around large data volumes.

Strong roadmap to address next-generation Extreme OLTP requirements

Page 32: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

(c) 2015 Independent SAP Technical User GroupAnnual Conference, 2015

Further Information

SAP Education and Certification Opportunities

www.sap.com/education

SAP Public Web

scn.sap.com www.sap.com

Page 33: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

Annual Conference, 2015 (c) 2015 Independent SAP Technical User Group

Questions and Answers

Page 34: Storage Optimization and Operational Simplicity in SAP  Adaptive Server Enterprise

Annual Conference, 2015 (c) 2015 Independent SAP Technical User Group

Thank You for Attending

Please complete your session

feedback form