DB2 10.5 for zLinux.nedb2ug.ppt 10.5 for zLinux.nedb2ug.pdf · DB2 10 for z/OS and DB2 10.1 Linux, Unix & Windows Multi-row INSERT, FETCH & multi-row cursor UPDATE, Dy namic Scrollable
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
DB2 LUW : One Database Platform for All Business Applications
Massive scale / 24x7 OLTP Platform
Active / Active 24x7Massive Data Scale Warehouse
Customer Infrastructure Optimised Deployment
NoSQL Spatial Analytics HADOOP Extensibility
In Memory BLU Acceleration
Temporal Data
Workload Management
Intelligent Compression
Advanced Application Functionality
Advanced Data Functionality
Autonomic Management
Data S
tudio
Continual Data Ingest/Access
Fine grained Security
Oracle Compatibility
Multi-tenant Enterprise Platform
MongoDBAPI
JSON/Graph Store Pure XML
Industry Standard API’s
Administration
Development
Performance Management
Data Warehouse Management
Configuration Management
Advanced RecoveryTools
HostConnectivity
Deployment Options
Enterprise Data Platform for all Business Applications
Available on zLinux
“Before we made a final decision we benchmarked some of the key database management systems. That includes Oracle, SQL Server and DB2. We ended up choosing DB2 for several reasons. One was reliability, second was performance and perhaps the most important factor was ease of use” – Bashir Khan, Director of Data Management and Business Intelligence
DB2 for LUW : Three Overarching Tenants
ResiliencyKeep data available and secure despite component failures, planned events, disasters, intrusions.
Cost EffectivenessAchieve leading performance with fewer resources.Do more with less.
Simplicity Simple to operateRich set of programming interfaces and tools to support agile development.
Example Technologies & Proof Points
Comprehensive Disaster Recovery with DB2 HADR
Online Operations, Reorg Avoidance and other
Comprehensive Data Security
Developer-friendly and ISV-friendly APIs including noSQL & JSON
Rich application semantics including time travel query
Automatic Configuration and Tuning
Automatic Maintenance
Exceptional scalability across scale-up and scale-out architectures
Industry Leading Data Compression
Comprehensive Flash/SSD Exploitation
Integrated Workload Management
ResiliencyKeep data available and secure despite component failures, planned events, disasters, intrusions.
Cost EffectivenessAchieve leading performance with fewer resources.Do more with less.
Simplicity Simple to operateRich set of programming interfaces and tools to support agile development.
DB2 10.5Analytics at the Speed of ThoughtFuture Proof VersatilityEnhanced SQL & noSQL function
What ?– Allow indexes to be defined with an expression, eg.
CREATE INDEX i1 ON emp (UPPER(lastname), salary+bonus)
Value Proposition– Efficient execution of SQL statements with such expressions, eg.
SELECT * FROM emp WHERE UPPER(lastname) = ? SELECT * FROM emp WHERE salary+bonus = ?
– Avoid the drawbacks of work-around (index on generated column)• Space consumption of extra column• Potential need to modify applications to reference the new column
Index on Expression
What ?– Allow indexes to be defined so that NULL keys are excluded, eg:
CREATE [UNIQUE] INDEX i1(c1, c2) EXCLUDE NULL KEYS Value Proposition
– Support applications whose semantics require unique enforcement, but only where keys are not NULL
– Storage savings ! (Avoid indexing NULLs if they are infrequently queried) Notes
– A “NULL key” is one where all key components are NULL
Excluding NULL Keys from Indexes
C1 C2
1 NULL Unique Constraint
InsertC1 C2
NULL NULL
C1 C2
1 NULL
NULL NULL
C1 C2 Regular Index ENK Index
1 NULLFail FailNULL NULL
C1 C2 Regular Index ENK Index
1 NULLFail SuccessNULL NULL
Excluded from ENK index
What ?– Allow tables to be defined with a row size which exceeds page size, eg:
Optimized for high speed data ingest Relaxed/absent ACID properties
– Logging is often turned off or done asynchronously to improve performance– “Fire and forget” inserts
• Applications include checking logic to verify update occurred– No concept of commit or rollback; each JSON update is independent
• Applications implement compensation logic to update multiple documents with ACID properties
Data is sharded for scalability– Shards are replicated asynchronously for availability– Queries to replica nodes can return back-level data sometimes
JSON documents are stored in “collections”– No “join” across collections, requires “in application” joins
Limited options for security, temporal, geo-spatial,...
The Best of Both Worlds -Agility with a Trusted Foundation
• What : Built-in JSON support in DB2 !•Including support for popular noSQL JSON APIs
• Why : Preserve mature DBMS features;Leverage existing skills and tools•Multi-statement Transactions•ACID•Extreme scale, performance and high availability•Comprehensive Security•Management/Operations•…
DB2 JSON Datastore : Concept & Motivation
Binary formatted JSON stored in the database (in LOBs)
Btree indexing to JSON elements for fast query processing
Java API and command line Optional “Fire-forget” inserts Supports transactions Smart query re-write DB2 ecosystem of tools Extend support to more
applications and developers
JSON API JSON Command Shell
JDBC Driver
SQL via DRDA
Java Apps
Key Shopping Cart
1 <binary JSON>
2 <binary JSON>
3 <binary JSON>item
“item”:”camera”
ApplicationsJava PHP NodeJS
AIM Developed MongoDB Wire ProtocolNoSQL JSON Wire Listener
BSON Wire Protocol
DB2inlined
LOBs
DB2 JSON Datastore : Features
www.ibm.com/developerworks.com and search for “DB2 JSON”
DB2 is an ideal data server on the new System zEC12. Customers know there are compelling availability and server virtualization/consolidation opportunities on System.With the IBM System zEC12, System z becomes an even more attractive platform for deploying DB2..
Data Center Virtualization with System z, z/VM & Linux
DB2 10
Business Intelligencewith System z & Linux
Cognos & DB2 10
High Availability with System z, z/VM & Linux
DB2 10 with HADR
Modernizationwith System z & Linux
DB2 10
IBM System zEC12 with Linux and DB2Yet Another High-performance DB2 Platform
DB2 10 for z/OS and DB2 10.1 Linux, Unix & Windows
Multi-row INSERT, FETCH & multi-row cursor UPDATE, Dynamic Scrollable Cursors, GET DIAGNOSTICS, Enhanced UNICODE SQL, join across encoding schemes, IS NOT DISTINCT FROM, VARBINARY, FETCH CONTINUE, Enhanced MERGE, SELECT from MERGE, routine versioning, timestamps w/timezone
Inner and Outer Joins, Table Expressions, Subqueries, GROUP BY, Complex Correlation, Global Temporary Tables, CASE, 100+ Built-in Functions including SQL/XML, Limited Fetch, Insensitive Scroll Cursors, UNION Everywhere, MIN/MAX Single Index, Self Referencing Updates with Subqueries, Sort Avoidance for ORDER BY, and Row Expressions, 2M Statement Length, GROUP BY Expression, Sequences, Scalar Fullselect, Materialized Query Tables, Common Table Expressions, Recursive SQL, CURRENT PACKAGE PATH, VOLATILE Tables, Star Join Sparse Index, Qualified Column names, Multiple DISTINCT clauses, ON COMMIT DROP, Transparent ROWID Column, Call from trigger, statement isolation, FOR READ ONLY KEEP UPDATE LOCKS, SET CURRENT SCHEMA, Client special registers, long SQL object names, SELECT from INSERT, UPDATE or DELETE, INSTEAD OF TRIGGER, Native SQL Procedure Language, BIGINT, file reference variables, XML, FETCH FIRST & ORDER BY in subselect & fullselect, caseless comparisons, INTERSECT, EXCEPT, not logged tables, OmniFind, spatial, range partitions, data compression, session variables, DECIMAL FLOAT, optimistic locking, ROLE, TRUNCATE, index & XML compression, created temps, inline LOB, administrative privileges, implicit cast, date/time changes, currently committed, moving sum & average, index include columns, row and column access control, time travel queryUpdateable UNION in Views, GROUPING SETS, ROLLUP, CUBE, more Built-in Functions, SET CURRENT ISOLATION, multi-site join, MERGE, MDC, XQuery, XML enhancements, additional data type (array, row, cursor), global variables, even more vendor syntax, temp table compression, MODULEs
z
luw
common
So What Is the Same? ( )
Editions– Advanced Enterprise Server Edition (AESE)– Enterprise Server Edition
PVU– 100 PVU/core (IFL) for older generations– 120 PVU/core for new systems
Core Features– (Adaptive )Compression – HADR
• Including multiple standby and reads on secondary– WLM (workload managemet)– Database Partitioning Feature
Editions– Advanced Workgroup Server Edition– Workgroup Server Edition– Express/Express-C Edition
PVU– PVU-less licenses
Features Unavailable– DB2 pureScale (needs GPFS, Mellanox IB/RoCE /w uDAPL from STG)
• HADR or DB2 data sharing for zOS are alternatives– DB2 BLU Acceleration– Encryption (3rd party tool (Vormetric) not available)….– Text search– Hypervisor Edition
• Can build your own image using the IWD toolkit– Kerberos plug-in– Various GUI tools that are normally client-side
Not so much in the core DB2 code– First of all, DB2 is more than 99% the same code across all platforms
• x64 Linux, pLinux, zLinux, AIX, Solaris, HP-UX, Windows– Linux for System z is a complete Linux implementation
• Pro; Reusable skills, common function• Con: Difficult to Differentiate
Core platform values provide value transparently– Inherent reliability creates unique opportunities
• E..g “virtual HA” (2 LPARs with HADR to protect against software failures– Optimized virtualization permits high consolidation ratio– Enormous scale-up potential reduces need for scale-out
Exception:– Code to have an up but idle DB2 “go to sleep” to help z/VM
conserve/consolidate resources– db2set DB2_MIN_IDLE_RESOURCES– Designed for zLinux, available on all Linux
Consolidation– Bring many small, typically lightly loaded databases together into a highly
consolidated and virtualized environment under z/VM
Migrate unhappy Oracle on zLinux customers – Oracle may be pushing them to Exadata– Oracle may be charging outrageous prices– Migration is typically relatively easy/trivial
• Especially if using a packaged app that already supports DB2
Use DB2 as the persistent data store inside another SWG solution– Websphere Portal Server– Cognos 10 content server– … many more
Use DB2 automatic storage– A modest number of storage paths that map sensibly to the SAN storage
Minimize the use of distinct page sizes– 8K is a good default (no more than 2)– Specify the smaller one at create database time for the catalog
Minimize the number of bufferpools– 1 for data/index, 1 for temp is usually sufficient
Go ahead and use plenty of tablespaces– Often helpful to split data/index/LOB (esp LOB) into separate tablespaces– No need to put EACH table in its own tablespace (common with DB2 for zOS)
Use the Autonomics – Autoconfigure & STMM
• But give DB2 a budget via instance_memory or database_memory
Compression– Turn on adaptive compression at create table time for top ~50 large tables