Sei sulla pagina 1di 35

DB2 9.

7
Dung Nguyen, dungnp@vn.ibm.com Information Management Systems Technical Consultant IBM Softwares Group

Agenda
DB2 Self Tuning Memory Management DB2 pureXML DB2 solidDB DB2 High Availability Disaster Recovery DB2 pureScale DB2 Partitioning DB2 Compression DB2 DB2 - PL/SQL Support

STMM in Action Dropping an Important Index


TPCH Query 21 - After drop index - Average times for the 10 streams
7000

Avg = 6205
6000

Time in seconds

5000

Reduced 63%
Indexes Dropped

4000

Avg = 2285
3000

2000

Avg = 959
1000

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

Order of execution 3

STMM in action Two databases on the same machine


7000000

Second database stopped

6000000

5000000

Second database started

Memory (in 4K Pages)

4000000

3000000

2000000

1000000 4

DB2 9: pureXML and Relational Capabilities


Relational and XML data are stored differently, but closely linked SQL to manipulate relational data SQL/XML to publish relational data as XML XQuery or SQL/XML to query XML data Join Relational and XML data

DB2 9 SERVER CLIENT


Relational Interface DB2 Storage: Hybrid DB2 Engine Relational

SQL/XML
DB2 Client / Client Application

XQuery

XML Interface

XML

T24 Data is XML !


Multi Value Data
[fm] 20040416 [vm] 20040418 [fm] [vm] [fm] -5000 [vm] -10000 [fm] -120000 [vm] -130000 [fm]

XML Long Tag <gValue_Date> <mValueDate m=1> <ValueDate c=79.1>20040416</ValueDate> <DebitMovement c=81.1>5000</DebitMovement> <ValueDatedBal c=82.1>120000</ValueDatedBal> </mValueDate> <mValueDate m=2> <ValueDate c=79.2>20040418</ValueDate> <DebitMovement c=81.2>10000</DebitMovement> <ValueDatedBal c=82.2>130000</ValueDatedBal> XML Short Tag </mValueDate> <c79>20040416</c79> </gValue_Date> <c79 m=2>20040418</c79> <c81>-5000</c81> <c81 m=2>-10000</c81> <c82>-120000</c82> <c82 m=2>-130000</c82>

xpath

Multi-values represented as XML with repeating elements


6

IBM and Temenos


IBM and Temenos are strategic partners, for hardware and software T24 runs best on IBM pSeries, AIX 64 T24 runs best with Websphere and DB2 Joint IBM/Temenos testing & benchmarking at Hursley and Montpellier IBM Innovation Center, Hursley, UK, 1 hour away from Temenos development facility Close cooperation between IBM & Temenos engineers during regular development cycle

T24/DB2 9.5 Benchmark at IBM Montepellier, May 08


Temenos test scenario with 25M accounts Performance goals defined by Temenos:
Online transaction throughput: 1500 TPS Close-of-Business elapsed time: 2 hours

DB2 results:
Online transaction throughput: 2900 TPS Close-of-Business elapsed time: 1h:28min

Further benchmark details available upon request

DB2 - solidDB: Solid Information Technology


IBM solidDB is a relational in-memory database software that delivers extreme speed; up to ten times faster than conventional databases
Extreme speed
Data is kept in main memory at all times Uses industry standard interfaces: ODBC, JDBC, SQL

Extreme availability
HA Solution available providing two copies of data at all times in separate solidDB instances In case of system failure, applications can recover access in less than a second

Low cost
Easy to deploy and administer Link-library Runs virtually unattended for lower total cost-of-ownership

Fully functional SQL92 compliant data server


Native C interfaces ODBC JDBC

Standard Database Usage Model


App App App App App

Applications may include:


OLTP Applications Batch operations Reporting systems Data Warehousing Interfaces to other systems

Read & Write access to the Centralized database system


10

IBM Software Group

DB2 High Availability via HADR


Automatic Client Reroute Client application automatically resumes on Standby,
typically in < 15 seconds, DB2 memory primed w/ recent data.
tx tx Network Connection tx tx

log records

HADR
Keeps the two servers in sync

Primary Server

Standby Server Includes TSA for server monitoring

Shared Nothing ! Storage is NOT shared.

Monitors the primary and initiates the takeover. (HACMP, heartbeat, MSCS, etc)
11

IBM Software Group

DB2 High Availability via HADR


Automatic Client Reroute Client application automatically resumes on Standby,
typically in < 15 seconds, DB2 memory primed w/ recent data.
tx tx Network Connection tx tx

HADR
Keeps the two servers in sync

Primary Server Includes TSA for server monitoring Shared Nothing ! Storage is NOT shared.
Monitors the primary and initiates the takeover. (HACMP, heartbeat, MSCS, etc)
12

IBM Software Group

DB2 High Availability via HADR


Automatic Client Reroute Client application automatically resumes on Standby,
typically in < 15 seconds, DB2 memory primed w/ recent data.
tx tx Network Connection tx tx

log records

HADR
Keeps the two servers in sync

Standby Server

Primary Server Includes TSA for server monitoring

Shared Nothing ! Storage is NOT shared.

Monitors the primary and initiates the takeover. (HACMP, heartbeat, MSCS, etc)
13

Transactions/sec
1000 1500 2000 2500 3000 3500 4000 500 0

IBM Software Group

How Fast Can Recovery Be ? A Customer Example

Time
Failover
14

9 Second 3500
Transactions/se c

0 20 0 40 0 60 0 80 0 10 00 12 00 14 00 16 00 18 00 20 00 22 00 24 00 26 00 28 00 30 00 32 00 34 00 36 00 38 00 40 00 42 00 44 00 46 00 48 00 50 00 52 00 54 00 56 00 58 00 60 00 62 00 64 00 66 00 68 00 70 00 72 00 74 00 76 00 78 00 80 00 82 00 84 00 86 00 88 00 90 00 92 00 94 00 96 00

IBM Software Group

HADR works at the database level


A server can be primary and standby for different databases

Server 1

Server 2

Primary Database A
HADR TCP/IP

Standby
HADR

Database A

Standby Database B
HADR TCP/IP

Primary
HADR

Database B

15

IBM Software Group

DB2 HADR
tion nec Con ary Prim

Cli ent Re ro u te

DB2 Engine

PRIMARY SERVER

STANDBY SERVER

DB2 Engine

TCPIP
Log Buffers HADR Log Pages HADR

Log Buffers Replay Master

Log Records

Log Writer

Log Writer

Redo Slaves Redo Slaves Redo Slaves Replay Slaves

Log Pages

Log Pages

Tables Indexes

Logs

Logs

Tables Indexes
16

IBM Software Group

HADR: Three Commit Modes


PRIMARY SERVER
HADR

STANDBY SERVER

TCP/IP
send() receive()
nc hr on ou s

HADR

c yn As
Ne ar -

Log writer

Log writer

n hro ou s

Logs

onous ynchr S

Sy

Logs

Commit Succeeded

17

IBM Software Group

Configuration is simple! Fits on One Slide:


Primary Setup db2 backup db hadr_db to backup_dir db2 update db cfg for hadr_db using HADR_LOCAL_HOST host_a HADR_REMOTE_HOST host_b HADR_LOCAL_SVC svc_a HADR_REMOTE_SVC svc_b HADR_REMOTE_INST inst_b HADR_TIMEOUT 120 HADR_SYNCMODE ASYNC

Standby Setup db2 restore db hadr_db from backup_dir db2 update db cfg for hadr_db using HADR_LOCAL_HOST host_b HADR_REMOTE_HOST host_a HADR_LOCAL_SVC svc_b HADR_REMOTE_SVC HADR_TIMEOUT HADR_SYNCMODE svc_a 120 ASYNC HADR_REMOTE_INST inst_a

db2 start hadr on database hadr_db as primary

db2 start hadr on database hadr_db as secondary

18

IBM Software Group

HADR Wizard
Sets up the Primary and Standby databases for HADR The wizard will guide the user to perform the following tasks:
Identify the HADR pair Perform database backup or select an existing backup Move image and restore on standby server Move any database objects not included in the backup image Update service files Update HADR configuration parameters on both databases Start HADR

19

IBM Software Group

Software upgrades on the fly


1. HADR in peer state 2. Stop HADR on the Standby 3. Upgrade the standby 4. Start the standby again Let it catch-up with primary 1. Issue a normal TAKEOVER The primary and standby change roles 1. Suspend the new standby 2. Upgrade the new standby 3. Reactivate the new standby Let it catch-up with primary

Server 1
Primary

Server 2
HADR HADR

Primary

HADR

HADR

HADR

HADR HADR

Primary

HADR HADR

Primary

1. Optionally, TAKEOVER again The primary and standby play their original roles

HADR

Primary

20

IBM Software Group

21

IBM Software Group

IBMs New Answer: DB2 pureScale


Unlimited Capacity
Buy only what you need, add capacity as your needs grow

Continuous Availability
Deliver uninterrupted access to your data with consistent performance

Application Transparency
Avoid the risk and cost of application changes

Leverages the architecture of z/OS: the Gold Standard of reliability and scalability Built and developed on Power servers and AIX
22

IBM Software Group

DB2 pureScale Architecture


Automatic workload balancing

Cluster of DB2 nodes running on Power servers

PowerHA pureScale technology drives the clustering Runs on an LPAR or a stand alone server

InfiniBand network

Shared Data IBM Storage supported

23

IBM Software Group

Predictable Scaling

Users network

IBM Smart Analytics System

User Module User Module


SMP server SMP server

Private GigE network

DB2 Partition

DB2 Partition

DB2 Partition

DB2 Partition

SMP server

SMP server

I/O Channels Storage server

24

IBM Software Group

Traditional Large Scans Result in I/O Wait

25

IBM Software Group

DB2 Database Partitioning Feature = Divide I/O


Database Partition 1 Database Partition 2

Database Partition 3

26

IBM Software Group

Add Range Partitioning to Further Reduce I/O


Database Partition 1 Database Partition 2

Database Partition 3

January

February

March

27

IBM Software Group

Add MDC to Further Reduce I/O


Database Partition 1

Database Partition 2

Database Partition 3

January

February

March

28

IBM Software Group

Compression Further Reduces I/O by a Factor of 4


Database Partition 1 Database Partition 2

Database Partition 3

January

February

March

29

IBM Software Group

DB2 Row Compression


Dictionary contains repeated information from the rows in the table
Compression candidates can be across column boundaries
Name Dept Salary City Province Postal_Code

Potopoulos Katsopoulos

510 500

10000 20000

Whitby Whitby

ONT ONT

L4N5R4 L4N5R4

Potopoulos

510

10000

Whitby

ONT

L4N5R4

Katsopoulos

500

20000

Whitby

ONT

L4N5R4

Dictionary
01
Pot 500 10000 (02) Kats 500 20000 (02)

opoulos WhitbyONTL4N5R4

02

30

IBM Software Group

Customer Experience: Storage Savings for 2 Large Tables at Autozone

81% Smaller 81% Smaller

79% Smaller

78% Smaller

SALES Fact Table

PRODUCT Dimension Table


31

IBM Software Group

Performance Gain from Compression: Reduced I/O Reduced response times


Avg Query Response Time

42% Faster

Also: smaller and faster database backups !

32

IBM Software Group

#1 DB2 runs Oracle PL/SQL natively


DB2 v9.7 supports:
Importing Oracle Database schemas Importing Oracle Database tables Using Oracles SQL (PL/SPL) in DB2 Moving Oracle Database applications to DB2 Supporting Oracle Databases concurrency model

Now the last remaining barrier is eliminated


Customers can leverage existing Oracle staff and skills with DB2!

33

IBM Software Group

Openbravo ERP

Open source web-based ERP system


Developed by Openbravo Millions of downloads Used in over 50 countries

Currently supported RDBMS Oracle & PostgreSQL Database Size 520 tables
400+ PL/SQL routines / triggers

34

IBM Software Group

Migration to DB2 9.7

1 WEEK
1. Map schema, data and SQL
Native support 99% of SQL compatible 156 of 158 procedures natively supported

1. Run the shared code


Native support

1. Test and Tuning

35

Potrebbero piacerti anche