DB2 9.7 Overview

7,922 views

Published on

Published in: Technology
1 Comment
5 Likes
Statistics
Notes
  • teodora_valdes@hotmail.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
7,922
On SlideShare
0
From Embeds
0
Number of Embeds
86
Actions
Shares
0
Downloads
382
Comments
1
Likes
5
Embeds 0
No embeds

No notes for slide

DB2 9.7 Overview

  1. 1. ibm.com/db2/labchats DB2 9.7: Technology Preview 6 May 2009 Tim Vincent Chief Architect, DB2 for Linux, UNIX, Windows © 2009 IBM Corporation
  2. 2. Disclaimer THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. ALTHOUGH EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN ADDITION, THIS INFORMATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM WITHOUT NOTICE. IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF CREATING ANY WARRANTY OR REPRESENTATION FROM IBM (OR ITS AFFILIATES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS); OR ALTERING THE TERMS AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT GOVERNING THE USE OF IBM SOFTWARE. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. 2 2 © 2009 IBM Corporation
  3. 3. Themes  Resource Optimization – Best performance with most efficient utilization of available resources  Ongoing Flexibility – Allow for continuous and flexible change management  Service Level Confidence – Expand your critical workloads confidently and cost effectively  XML Insight – Harness the business value of XML  Break Free with DB2 – Use the database server that gives you the freedom to choose  Balanced Warehouse – Create table ready warehouse appliance with proven high performance 3 3 © 2009 IBM Corporation
  4. 4. Resource Optimization • Compression • Storage I/O optimization • Ease of storage management • HA and/or DR utilization 4 4 © 2009 IBM Corporation
  5. 5. Compression Improvements – Multiple algorithms for automatic index compression Unique in the industry – Automatic compression for temporary tables Table Temp Table Temp Unique in the Order By Order By industry – Compression of large objects and XML – Replication of Compressed Tables Log db2ReadLog API Compressed user data in logs Dictionary Uncompressed user data in logs 5 5 © 2009 IBM Corporation
  6. 6. Index Compression: Measurements Index Compression Space Savings TPC-DS 50% Index compression uses idle CPU SAP-bw 57% cycles and idle cycles spent waiting for I/O to compress & decompress Type of Database SAP-sd 20% SAP-ssqj 24% Average 36% index data DDMV 16% SPAR 55% When we are not CPU bound, we TD-EDW 31% are able to achieve better 0% 10% 20% 30% 40% 50% 60% 70% performance in all selects, inserts Percentage Compressed and updates * Higher is better Simple Index Compression Tests - CPU Analysis Simple Index Compression Tests - Elapsed Time Update: Ixcomp 33.9 2.5 45.0 18.5 44.07 22% Faster Update: Base 23.6 2.6 48.2 25.9 Simple Update 53.89 Insert: Ixcomp 20.8 2.0 46.3 30.9 23% Faster 68.3 Simple Insert Insert: Base 16.2 1.6 49.1 33.3 83.99 Select: Ixcomp 34.8 17.5 36.4 11.4 Simple Select 49.12 Runs 49.24 Select: Base 34.5 16.7 37.1 11.7 As fast 0% 20% 40% 60% 80% 100% 0 10 20 30 40 50 60 70 80 90 Machine Utilization Seconds user system idle iowait Without Index Compression With Index Compression 6 * Lower is better 6 © 2009 IBM Corporation
  7. 7. Temp Compression: Measurements Space Savings for TPC-DS Queries with Temp Elapsed Time for TPC-DS Queries with Temp Compression Compression 100.0 200.00 190.00 80.0 180.00 5% 56% less Faster 170.00 60.0 space Size (Gigabytes) Minutes 160.00 40.0 78.3 150.00 183.98 175.56 50.2 140.00 20.0 130.00 0.0 120.00 Without Temp Comp Total Bytes Stored With Temp Comp Bytes Stored •swg-db2kit Without Temp Comp Runtime With Temp Comp Runtime * Lower is better * Lower is better TPC-DS CPU Analysis for Temp Compression Effective 80.00 CPU Usage 60.00 14.61 22.19 I/O Wait 40.00 User CPU 46.50 20.00 39.26 0.00 Baseline Index Com pression 7 7 © 2009 IBM Corporation
  8. 8. Simple Space Reclamation  New tablespace format to allow automated extent remapping  Allow extents that are not assigned to any object (eg. table, index) to be used by other tablespaces ALTER TABLESPACE REDUCE … XXX | MAX  All new tablespaces will have this format  Storage in an MDC table is tracked through a ‘block map’ – which extents have data and which don’t – When a block is emptied the storage remains with the table and is available for later reuse by that table  New option on reorg table command to not reorg the table but reclaim these empty blocks/extents REORG TABLE <mdc table> RECLAIM EXTENTS ON [table partition clause] 8 ALLOW WRITE ACCESS | ALLOW READ ACCESS | ALLOW NOACCESS 8 © 2009 IBM Corporation
  9. 9. Automatic Storage Migration  Support ALTER DATABASE command for non-auto AS database  Allow existing tablespaces to grow into auto storage containers ALTER TABLESPACE <table_space_name> MANAGED BY AUTOMATIC STORAGE Existing containers can no longer be altered.  Support redirected tablespace restore to AS tablespace RESTORE DB <dbname> REDIRECT SET TABLESPACE CONTAINERS FOR <tablespaceID> USING AUTOMATIC STORAGE  REBALANCE support after a new path is added to the database – Allows existing tablespaces to use new path  Ability to DROP a path from an automatic storage database. – Can be used to migrate to new containers 9 9 © 2009 IBM Corporation
  10. 10. Scan Sharing Buffer Pool Reread only Start scan 2 at missing pages current position of scan 1 User 1 Scans Data User 2 Scans Data 10 10 © 2009 IBM Corporation
  11. 11. Scan Sharing for DB2 Scan Sharing Performance Test  TPCH Q1 : CPU Intensive, Slow Query On Lineitem Table Using A Table Scan  TPCH Q6 : IO Intensive, Fast Query On Lineitem Table Using A Table Scan Test Scenario : Queries executed in parallel in the following sequence Q1 30 S cs e Q6 60 Secs Q1 90 Secs Q6  Results : 34% Improvement In End to End Timing Read s o n a d isk: 42% Red u ctio n CPU Usage 4 70 Base ScanSharing C u m ila tive R e a d s Sc a n Sh a rin g Base 60 3 50 M illio n s % Time Spent 40 2 30 20 1 10 0 0 User System Idle IO Wait T im e 11 11 © 2006 IBM Corporation © 2009 IBM Corporation
  12. 12. DB2 9.7 Delivers Even Faster OLTP with Statement Concentrator DB2 9.7 – Optionally replace literals with parameter markers • Increases section sharing and reduces compilation – Reduces number of statements to be compiled SELECT BALANCE WHERE ACCOUNT_ID = 12345 SELECT BALANCE WHERE ACCOUNT_ID = 11111 SELECT BALANCE WHERE ACCOUNT_ID = 54321 Compile SELECT BALANCE WHERE ACCOUNT_ID = 12121 SELECT BALANCE WHERE ACCOUNT_ID = ? Execute 12 12 © 2009 IBM Corporation © 2009 IBM Corporation
  13. 13. HADR Reads on Standby Read/Write Clients Read-Only Clients DB Logs Primary Standby Clients Clients HADR with Reads on Standby HADR Standby database is functional not only for high availability and disaster recovery purposes but also for running read-only workloads. Can offload reporting, DSS/BI workloads to Standby Run concurrent read-only workloads with minimal impact to Standby system’s high availability and disaster recovery role. Increases capacity of the HADR system 13 13 © 2009 IBM Corporation
  14. 14. Ongoing Flexibility  Schema Evolution  Data Life Cycle  Warehouse Growth  Transportable Tablespaces 14 14 © 2009 IBM Corporation
  15. 15. Schema Evolution  Relax the object dependency model – Allow changes that affect dependent objects to succeed – Automatically revalidate dependent objects • ALTER TABLE, ALTER COLUMN, DROP COLUMN, RENAME COLUMN • CREATE OR REPLACE ALIAS, FUNCTION, NICKNAME, PROCEDURE, SEQUENCE, TRIGGER, VARIABLE, VIEW • DROP FUNCTION, NICKNAME, PROCEDURE, SEQUENCE, TABLE, TRIGGER, TYPE, VARIABLE, VIEW, TABLE  Extend to support – RENAME COLUMN – Support CREATE OR REPLACE syntax for views, functions, triggers, etc. – Allow additional data type changes via ALTER COLUMN • Between any types SQL runtime can cast 15 15 © 2009 IBM Corporation
  16. 16. Online Table Move ADMIN_MOVE_TABLE  Move data in an existing table to a new table object  Source table remains online: both read (select) and write (IUD) operations  Final phase renames the tables: target table will have the original table name Use Cases  Online table compression  Online REORG or Redistribute  Online conversion to LARGE tablespaces  Move data/index/long data to new/different tablespaces  Support for limited schema evolution: – Add or remove columns, change column datatypes – Add/change MDC dimensions, range partitioning or partitioning key 16 16 © 2009 IBM Corporation
  17. 17. Data flow Online table move control table SYSTOOLS.ADMIN_MOVE_TABLE tabschema tabname key value SOURCE TARGET TABLE COPY TABLE c1 c2 … cn c1 c2 … cn STAGING TABLE INSERT c1 c2 … cn REPLAY DELETE Rows re-copied UPDATE from source table (by key) Keys of changed rows captured via triggers 17 17 © 2009 IBM Corporation
  18. 18. Range Partitioned Tables Local (aka partitioned) indexes Jan 07 Feb 07 … Dec 07 Jan 08  Ability to create local (partitioned) index  Unique index must be superset of partition DP1 key DP2 DP12 Example: CREATE INDEX pINX1 on SALES (sales_date, partID) PARTITIONED IP1 IP2 IP12  Partitioned index is the default  Partition level reorg ATTACH  Detach availability improvements 18 18 © 2009 IBM Corporation
  19. 19. Range Partitioning with Local Indexes Total Time and Log Space required to ATTACH 1.2 million rows 651.84 Log Space used, 1.E+03 180.00  Partition maintenance with MB Attach/Set Integrity time (sec) Attach/Set Integrity 160.00 time (sec) Log Space required (MB) ATTACH 1.E+02 140.00 120.00 – 20x speedup compared to 1.E+01 100.00 9.5 global index because of 1.E+00 80.00 reduced index maintenance 0.21 60.00 40.00 1.E-01 0.05 – 3000x less log space used 0.03 20.00 than with 9.5 global index 1.E-02 V9.5 Global Cobra Local Cobra Local No Indexes - 0.00 Indexes Indexes built Indexes built Baseline during ATTACH before ATTACH  Eliminates asynchronous index Local Indexes * Lower is better maintenance on DETACH Index size comparison: Leaf page count 20,000  Local indexes occupy fewer disk 25% Index leaf pages 16,000 pages than 9.5 global indexes Space Savings 12,000 – 25% space savings is typical 18,409 8,000 – 12% query speedup over 13,476 global indexes for index 4,000 queries – fewer page reads 0 global index on RP table local index on RP table 19 * Lower is better 19 © 2009 IBM Corporation
  20. 20. Transportable Schema  Efficient schema movement between databases  Transport schema from a backup image  Performance objective – 100 GB in under 20 minutes  Restore will now do multiple operations – Restore the syscatspace and specified table spaces from the backup image – Roll them forward to a consistency point – Validate the schemas specified – Transfer ownership of the specified table spaces to the target DB – Recreate the schema in the target DB 20 20 © 2009 IBM Corporation
  21. 21. Transport Sets doesn’t work tablespace1 tablespace2 tablespace3 tablespace4 tablespace5 tablespace6 schema1 schema3 schema4 schema2 schema5 works works works 21 21 © 2009 IBM Corporation
  22. 22. Service Level Confidence • Resource Optimization • Ongoing Flexibility • Resilience and Reliability • Performance • Monitoring • Workload Management 22 22 © 2009 IBM Corporation
  23. 23. End to End Monitoring Where is my DB application spending its time? User User experience App pre- and post-processing IBM Tivoli Composite Application transaction Application Manager for WebSphere SQL 1 SQL 2 COMMIT Application Server (ITCAM for WAS) − Application and WebSphere or application server Java App Server insight JCC driver IBM DB2 Performance Expert V3.2 with Network Extended Insight Feature − Transaction context − Connection, driver, DB2 LUW network, and database insight Operating System 23 23 © 2009 IBM Corporation
  24. 24. Moving away from System Monitor  Begin to move away from system monitor and snapshot technology for database monitoring – Moving towards SQL access direct to internal memory – Continuing the trend of WLM table functions in DB2 9.5  New, parallel monitoring infrastructure introduced which is independent of system monitor infrastructure – i.e. not connected to existing system monitor infrastructure such as monitor switches  Aim is to replace most commonly used database snapshot mechanisms over time – Only a few will be explicitly deprecated in Cobra but alternatives will be provided – Snapshot still needed in future for instance level information 24 24 © 2009 IBM Corporation
  25. 25. “Time Spent” Metrics (example) Total Time Default Time Metrics Bufferpool Read Wait Bufferpool Write Wait Direct I/O Read Wait Direct I/O Write Wait Lock Wait Agent Wait WLM Queue Wait FCM Send Wait FCM Receive Wait Network Send Wait Network Receive Wait Log Write Wait Log Buffer Insert Wait Wait Times Processing / Non-Wait Time 25 25 © 2009 IBM Corporation
  26. 26. “Component Time” Metrics (example) 26 26 © 2009 IBM Corporation
  27. 27. Workload Management  Objectives – Deprecation of Query Patroller and Governor – Strengthen overall offering – Improve “Time to Value” for DB2 Workload Manager  Service Class Enhancements – Buffer Pool I/O priority • Bias victim selection in Buffer Pool by assigning priority to pages visited by activities executing in a service class • Reduces likelihood of high priority pages being selected as victim by low priority work – Linux WLM integration • Available on Linux kernel 2.6.26 or above • Identical to AIX WLM integration from the DB2 perspective 27 27 © 2009 IBM Corporation
  28. 28. Workload Management  Enhanced Thresholds – Rows Read – Processing Time (CPU) – Aggregate System Temp  Workload Enhancements – Allow Activity Thresholds to be assigned at the workload level • Estimated SQL cost, SQL rows returned, activity total time, SQL temp space • Rows read • Processing time 28 28 © 2009 IBM Corporation
  29. 29. Priority Tiers Concept WLM Aging 29 29 © 2009 IBM Corporation
  30. 30. Separation of Duties  Remove implicit DBADM from SYSADM  Remove ability to grant DBADM and SECADM from SYSADM  Allow SECADM to be granted to groups and roles  Allow SECADM to GRANT/REVOKE database and object auth  Setup up a DBADM that does not have the capability to grant and revoke privileges or access data GRANT DBADM ON DATABASE WITHOUT ACCESSCTRL TO USER JOE GRANT DBADM ON DATABASE WITHOUT DATAACCESS TO USER JOE  Remove secondary grants implicitly done when DBADM granted – BINDADD, CONNECT, CREATETAB, IMPLICIT_SCHEMA, LOAD,…  Introduce new authorities – EXPLAIN, DATAACCESS, ACCESSCTRL, SQLADM, WLMADM authorities – SQLADM authority can perform event monitor commands, holds EXPLAIN privilege, and can execute RUNSTATS 30 30 © 2009 IBM Corporation
  31. 31. XML Insight • ODS and warehouse • Shared nothing support • Large scale systems • Range partitioning • MDC • XDA compression 31 31 © 2009 IBM Corporation
  32. 32. XML on DPF: Scalability Simple query: Elapsed time speedup from 4 to 8 partitions Complex query: Elapsed time speedup from 4 to 8 partitions 2.5 rel xml 3.5 xmlrel 80% of rel rel xml 3 xmlrel 80% of rel 2 Elapsed time 4P / 8P 2.5 Elapsed time 4P / 8P 2 1.5 * 1.5 1 1 0.5 0.5 0 1 2 3 4 5 6 7 8 9 10 0 count w ith count, no grouped agg update colo join noncolo join Query number index index * Higher than red line is better  Each query run in 2 or 3 equivalent variants: – Completely relational (“rel”) – Completely XML (“xml”) – XML extraction/predicates with relational joins (“xmlrel”) (join queries only) 32  XML SCALES AS WELL AS RELATIONAL 32 © 2009 IBM Corporation
  33. 33. Break free with DB2  Ongoing focus on flexibility  Support other DBMS’s SQL, natively  Easy for developers to query DB2  Fast performance  Support other DBMS’s procedural language, natively  Easy for developers to program DB2  Fast performance for procedural logic  Easily import other DBMS’s schemas  Easy for developers to set up DB2  Support other DBMS’s concurrency models  Easy for developers to use DB2  Support flexible data typing  Easy for developers to work with DB2 33  And more… 33 © 2009 IBM Corporation
  34. 34. Babylonian Confusion (aka Lock-In) Another DBMS PL/SQL SQL/PSM NUMBER SQL ’92, … (aka SQL PL) DB2 “DATE” recursion, .. VARCHAR2 CONNECT BY, DBMS_OUTPUT GRAPHIC INTERVAL, .. SELECT FROM INSERT “Forge SQL Standard t about portabl e code rds” , explo standa it oh en tp m mi tted to e DBMS!” ( M is co usen et wisd “IB om) Where does this leave YOU? 34 34 © 2009 IBM Corporation
  35. 35. What’s changed in DB2? Writers no longer block Current DBMS  DB2 9.7 readers! Concurrency Control  Native support INITCAP, TO_NUMBER TO_CLOB, TO_LOB, TO_TIMESTAMP, date/time Scalar Functions  Native support functions, ADD_MONTHS EXTRACT, LAST_DAY, MONTHS_BETWEEN, SQL  Native support NEXT_DAY, ROUND, TRUNC , ROWNUM, TO_DATE, e.g. CONNECT BY, TO_CHAR, LPAD and RPAD, NEXTVAL, CURRVAL, Data Types  Native support INSTR DECODEGREATEST, MIN, MAX, DATE ROWNUM, DUAL, LEAST, BITAND, BITOR, TIMESTAMP(n) BITXOR, TRUNCATE TABLE, Implicit Casting  Native support VARCHAR 2BITNOT BITANDNOT, ROWID, etc) Weak typing BOOLEAN allows assignment or ROW comparison between ASSOCIATIVE ARRAY Procedural SQL  Native support differing CURSORdata types. %TYPE% equiv Strings, dates, numerics %ROWTYPE% equiv JDBC  Native support NUMBER Administrative Scripts  Native support 35 35 © 2009 IBM Corporation
  36. 36. Concurrency Control in DB2 9.7  Reads the currently committed version of a row – If uncommitted row-change found use currently committed version  Log based – No management overhead – No performance overhead – No wasted memory/storage (no undo tablespace) Scanner Memory Lookup User 1: Table T1 Log Buffer update T1 set name = ‘Russo’ Name Country RID 1=Rossi->Russo where country=‘Italy’ X Rossi Russo Italy Bernard France Garcia Spain Log Files User 2: select * from T1 Pappas Greece Levi Israel Peeters Belgium Locks 36 36 © 2009 IBM Corporation
  37. 37. DB2 Early Access Program quot;Our uptime on DB2 9.5 was already very, very close to 100 percent so it’s difficult to improve upon that. But the stability of the product is really outstanding. We see a lot of new features in DB2 9.7 that we think can help developer productivity and reduce the amount of code significantly.quot; --- John Enevoldson, Pulsen  Test-drive the new features! – Get more details and sign up for the DB2 Early Access Program: www.ibm.com/db2/technology-sandbox/ 37 37 © 2009 IBM Corporation
  38. 38. > Questions 38 38 © 2009 IBM Corporation
  39. 39. Thank You! ibm.com/db2/labchats g ! din t en a t for u yo nk T ha 39 39 © 2009 IBM Corporation

×