DB2 – "Data is the reason computers exist."


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

DB2 – "Data is the reason computers exist."

  1. 1. IBM System i5 DB2 – “Data is the reason computers exist.” Doug Mack WW iSeries Sales mackd@us.ibm.com © 2006 IBM Corporation
  2. 2. IBM System i5 V5R4 On Demand Performance Center – DB2 Usability Enhancements: iSeries Navigator • Index Advisor (real time vs. requiring DB Mon data to be captured) • Real time analysis of SQL Plan Cache – Improved database monitoring capabilities • Filters to focus on specific user or sql call DB2 UDB for iSeries • Drill through analysis • Before/after comparison (what changed?) Microsoft SQL Server 2000 – Autonomic Indexes Additional Standards Support Oracle 10g – SQL and DB2 Family 0 10 20 30 40 50 60 70 80 90 100 • E.g., OLAP extensions Many Performance Improvements 2003 Core Items – SQL Stored Procedures, SQL Query Engine – Data Warehouse Enablement SQL 2003 Core Standard Improved .Net Support 100% Complete with V5R4!! – iSeries Access and DB2 Connect for iSeries 2 © 2006 IBM Corporation
  3. 3. IBM System i5 3 © 2006 IBM Corporation
  4. 4. IBM System i5 DB2 “firsts” or “exclusives” DB2 UDB for iSeries Features – Single Level Storage – Automatic Statistics Collection – Parallel I/O – Auto balancing of tables and indexes – Encoded Vector Indexes – Internodal data partitioning – Conditional Logic within Triggers – Lookahead Predicate Generator – Predictive Query Governor – DRDA Remote Unit of Work – Standard SQL Stored Procedures – Parallel Index Build – …. 4 © 2006 IBM Corporation
  5. 5. IBM System i5 DB2 Modernization Roadmap: SG24-6393 Improve Enhance The Integrate Your End-User Create A Integrate Business Traditional Productivity Experience Modular Applications Processes Architecture 5250 5250 5250 5250 5250 5250 GUI GUI GUI GUI User Interface ILE RPG/COBOL RPG/COBOL RPG/COBOL ILE/Java ILE and Java Java/EJB HTML/JSP HTML/JSP HTML/JSP HTML/JSP Servlets Servlets Servlets Servlets Portlets Portlets Portlets Portlets DDS/RPG to SQL XML XML XML XML Use of Advanced DB2 Functions Connectors Process Choreography XML, Unicode, Web Services Web Services Web Services Remote DB2 Calls: ODBC, JDBC, .NET DB2 and SQL DB2 and SQL DB2 and SQL DB2 and SQL DB2 and SQL DB2 and SQL Data Analytics (Bus. Intelligence) 5 © 2006 IBM Corporation
  6. 6. IBM System i5 Building SQL/Query Optimization Skills in 2006 Attend the SQL/Query Performance (4 Day) Workshop – “This is the best IBM class I have ever attended.” • http://www-03.ibm.com/servers/eserver/iseries/service/igs/db2performance.html – In some cases, might make sense to bring on-site DB2 Administration and Monitoring Tooling – iSeries Navigator – Centerfield Technologies: http://www.centerfieldtechnology.com/ Enteprise Edition Services Vouchers: DB2 SQL/Query Performance Assessment – Proactively identify potential problems – ASSESSMENT only (usually done remotely) White Papers, COMMON, ITSO, Tech Conferences – http://www-03.ibm.com/servers/eserver/iseries/db2/ 6 © 2006 IBM Corporation
  7. 7. IBM System i5 Data Warehousing and Business Intelligence 43% of LE Customers will implement Business Intelligence or a data warehouse in 2006 (SMB SAP BW 3.5 Benchmarks % is even higher) 1 End User Query Performance V5R3 and V5R4 are HUGE Releases for DB2 Data Warehousing 300000 – #1 in SAP Business Warehouse 250000 Business Drivers 200000 DB2 i5/OS 4w iSeries – Marketing: Customer Segmentation SQL Srv 16w Unisys – Finance: Compliance, budget/planning 150000 DB2 i5/OS 8w iSeries – C-Level Execs: Dashboarding Oracle 10g Fujitsu 8w – Sales and Operations: Sales/Product/Supplier 100000 DB2 i5/OS 8w iSeries Analysis 50000 Leverage the Tools Innovation Program 0 – http://www.developer.ibm.com/vic/hardware/port al/iii_pages/iii_tools_innov_roadmap DB2 i5/OS regains leadership on January 23, 2006 *See detailed certified benchmark results at http://www.sap.com/solutions/benchmark/BW2_results.htm 7 © 2006 IBM Corporation 1 Source: GMV 1H 2005, Forrester, IDC
  8. 8. IBM System i5 iSeries Tools Innovation – Business Intelligence Vendors SQL/Query Performance & tuning On-Line Analytical Processing (OLAP) Enterprise Reporting Data Replication Data Extraction/Transformation/Load Data Mining/Predictive Analytics iSeries Tools Innovation Web Portal - http://www-1.ibm.com/servers/enable/tools/innovation/ 8 © 2006 IBM Corporation
  9. 9. IBM System i5 DB2 Information Management and the iSeries DB2 Family Products – DB2 Connect for iSeries • DB2 family connectivity, .NET developer productivity, and DB2 family “centers” – Websphere Information Integrator • Middleware to enable applications access to heterogeneous databases – Ex: RPG program can access data directly in Oracle or SQLServer • ONLY runs in AIX or IXA/IXS on iSeries – Content Manager V8.3 Standard • Announced 4Q 2005 • Storage and indexing of non traditional forms of data (images) – QMF, Data Propagator, DB2 Extenders • Query tool, data replication, and XML Programming Enablers 9 © 2006 IBM Corporation
  10. 10. IBM System i5 DB2 UDB for iSeries V5R4 Details Application Flexibility & Portability Performance Free Format RPG & SQL SQL Query Engine enhancements Enhanced SQL Standards support –LIKE & LOB Support –Scalar FullSelect –Sensitive Cursors –Standard Flagger –Autonomic Indexes Improved DB2 Family Compatibility Faster SQL Procedural Language –Recursive Expressions Enhanced MQT Optimization –OLAP Support – RowNumber & Faster XML Extenders Rank –ANS Timestamp Format Usability –TDES Encryption iSeries Navigator Enhancements –2 MB SQL Statements & 32K keys –DB2 On Demand Performance Center OnDemand & Availability –SQE Plan Cache Analyzer Cross-Reference Files Robustness –DB2 Health Center Automatic Journaling Enhancements Resource Governor SMAPP for EVIs Governor Exit Point Parallel Rollback Unlock DB2 Content Manager 10 © 2006 IBM Corporation
  11. 11. IBM System i5 Application Development – iSeries Access for Windows .NET Provider Enhancements OLE DB Driver – LOB column support** – System Naming & Library List support – System Naming & Library List support** – MS FW 2.0 Compatibility** ODBC Driver – Intellisense support to aid programmers – Optimization Goal connection – Multiple active result sets on a connection attribute – Customizable string processing **Available with latest V5R3 Service Pack JDBC – Version 3 currency & performance – Optimization Goal connection attribute IBM EWLM support added to CLI, DRDA, .NET, ODBC, JDBC Driver support for Windows Vista (depending on availability) 11 © 2006 IBM Corporation
  12. 12. IBM System i5 Application Development – DB2 Connect Unlimited Edition for iSeries New customized package for iSeries developer community – available since 3Q05 Affordable access to: – DB2 Add-Ins for Visual Studio – Federated Data access • Joining of DB2 tables in different iSeries partitions • Joining of DB2 tables across iSeries & LUW server – Extend iSeries data to mobile devices: DB2 Mobility on Demand More details: ibm.com/software/data/db2/db2connect/edition-uei.html 12 © 2006 IBM Corporation
  13. 13. IBM System i5 DB2 add-ins for Visual Studio .NET DB2 Tools Toolbar Toolbox DB2 Projects IBM Explorer Intellisense Dynamic Help SQL Editor Properties DB2 Output Message Pane 13 © 2006 IBM Corporation
  14. 14. IBM System i5 DB2 Development Center Tool for Database Programmers and Application DBAs Rapid, iterative development of Java and SQL-PL stored procedures, user-defined functions, triggers, types, ... for DB2 for iSeries, DB2 for zSeries and DB2 for Linux, UNIX and Windows No need to know programming languages (VB, C#, Java etc.) portable SPs in SQL-PL or Java Integrated debugger 14 © 2006 IBM Corporation
  15. 15. IBM System i5 Do-It-Yourself Programming Languages Why do you use PHP? Zend's June 2003 market snapshot of the PHP community. The survey had over 10,000 respondents. http://www.zend.com/zend/php_survey_results.php 15 © 2006 IBM Corporation
  16. 16. IBM System i5 DB2 plug-ins for Zend Studio for PHP Data Perspective Debugger SQL Editor DB2 Output Message Pane 16 © 2006 IBM Corporation
  17. 17. IBM System i5 Richer Toolbox of SQL Functions Triple DES Data Encryption – ENCRYPT_TDES – Will be available across the DB2 Family – Data Encryption White Paper: ibm.com/servers/enable/site/education/abstracts/4682_abs.html Date/Time Processing – LAST_DAY, NEXT_DAY, ADD_MONTHS, VARCHAR_FORMAT Statistical Processing – STDDEV_SAMP & VARIANCE_SAMP Miscellaneous – GENERATE_UNIQUE – RAISE_ERROR SELECT emp_name, CASE job_type WHEN 1 THEN ‘Programmer’ WHEN 2 THEN ‘Administrator’ WHEN 3 THEN ‘Project Manager’ WHEN 4 THEN ‘Manager’ ELSE RAISE_ERROR(‘70001’, ‘Invalid JobType’) END FROM employee 17 © 2006 IBM Corporation
  18. 18. IBM System i5 INSTEAD OF Triggers (IOTs) New Trigger type can be used to change the semantics of INSERTs, UPDATEs, & DELETE operations against a view – Certain views contain transformations that make the view read-only, but application really wants to use the View for all I/O operations – Not part of V5R3 GA, delivered with V5R3 DB Group PTF #4 (ibm.com/iseries/db2/iot.html) • New trigger type not viewable with iSeries Navigator or DSPFD, etc in V5R3 • All view types are NOT supported in V5R3 (eg, views referencing more than one table not supported until next release ) – Example: CREATE VIEW my_logins(system, login, passwd) AS SELECT system,login,decrypt_char(passwd) FROM regusers WHERE userid=USER CREATE TRIGGER insert_my_logins INSTEAD OF INSERT ON my_logins REFERENCING NEW AS n FOR EACH ROW MODE DB2SQL INSERT INTO regusers VALUES (USER,n.system,n.login,Encrypt(n.passwd)) CREATE TRIGGER update_my_logins INSTEAD OF UPDATE ON my_logins REFERENCING OLD AS o NEW AS n FOR EACH ROW MODE DB2SQL UPDATE reguser SET system=n.system,login=n.login,passwd=Encrypt(n.passwd) WHERE system=o.system AND login=o.login AND userid=USER 18 © 2006 IBM Corporation
  19. 19. IBM System i5 Performance Enhancements SQL Query Engine (SQE) Enhancements – Support for LIKE, LOB columns, SUBSTR, and Sensitive Cursors – Enhanced Partitioned Table optimization – Autonomic Indexes Faster SQL Procedural language with Expression Evaluator Faster XML Extenders Transaction Manager Enhancements – Parallel Rollback Unlock – Soft Commit - Reduce disk forcing with QIBM_TN_COMMIT_DURABLE environment variable Accelerator for System i5 boosts performance for SQL-intensive workloads on low-end 520 servers as well as Java & Websphere workloads 19 © 2006 IBM Corporation
  20. 20. IBM System i5 “SQE-only” SQL Following SQL enhancements are only available to programmer if the SQL request is executed by SQE – otherwise SQL0255 returned – Recursive CTE – RowNumber, Rank, & Dense_Rank – Subquery & Scalar FullSelect – INTERSECT & EXCEPT set operators – MQT Optimizer Awareness – iSeries Navigator SQL Plan Cache Tool Remaining SQE restrictions • Sort sequences, • UDTFs, UPPER & LOWER functions • Logical File References • Select/Omit Logical Files • Non-SQL interface • Read Triggers V5R4 includes Statement of Direction for Sort Sequence support of RCTE, RowNumber, Rank, Subquery & Scalar FullSelect in the next release 20 © 2006 IBM Corporation
  21. 21. IBM System i5 Enhanced Performance Tooling Predictive Temporary Storage Governor – STORAGE_LIMIT QAQQINI option – QRYSTGLMT parameter on CHGQRYA command Governor exit point for easier administration, QIBM_QQQ_QUERY_GOVR CURRENT DEGREE special register for controlling DB2 SMP parallelism via SQL VOLATILE Table Support CREATE TABLE worktable (id INT, name CHAR(10), current_total DEC(8,2)) VOLATILE New filters on STRDBMON command – JOB wildcarding (QZDAS*) – RUNTHLD, FTRFILE, FTRUSER, FTRINTNETA New Redbook on Database Monitor: Diagnosing SQL Performance on DB2 UDB for iSeries (SG24-6654) 21 © 2006 IBM Corporation
  22. 22. IBM System i5 DB2 Family & MQTs Stage 2– V5R4 MQT Example: CREATE TABLE Example_MQT AS (SELECT Geography, Region, Year, Month, SUM(Revenue) AS Total_Revenue, SUM(Quantity) AS Total_Quantity, COUNT(*) AS Rows_per_Group FROM Example_Table GROUP BY Geography,Region,Year,Month) DATA INITIALLY IMMEDIATE REFRESH DEFERRED ENABLE QUERY OPTIMIZATION MAINTAINED BY USER Optimizer could use the MQT instead of fully executing the following query: SELECT Geography, Year, SUM(Revenue) AS Total_Revenue, SUM(Quantity) AS Total_Quantity, FROM Example_Table WHERE Year IN (2004, 2005) GROUP BY Geography, Year; white paper: ibm.com/servers/enable/site/education/abstracts/438a_abs.html User responsible for keeping MQT data current and activating optimizer MQT awareness with QAQQINI options 22 © 2006 IBM Corporation
  23. 23. IBM System i5 Enhanced Index Advice System-Wide Index Advisor - Always Active Advice can be viewed at database, schema or table level Index Advice, also enhanced (SQE Only) SQE Optimizer will also examine Join, Grouping, Ordering criteria Available on V5R3 with latest DB Group PTF 23 © 2006 IBM Corporation
  24. 24. IBM System i5 Advanced Database Monitor Filtering 24 © 2006 IBM Corporation
  25. 25. IBM System i5 Database Monitor Analysis Simplified Monitor Comparison Utility 25 © 2006 IBM Corporation
  26. 26. IBM System i5 Additional Management Enhancements DB2 Health Center – Monitor database metrics – Check which objects are nearing DB2 limits Index Evaluator (first available on V5R3) – “Native” last-used date added in V5R4 MQT Evaluator OnDemand SQL Analysis – enhanced “Show Current SQL” – Statement name – Program or package name – Open Information 26 © 2006 IBM Corporation
  27. 27. IBM System i5 Resources DB2 UDB for iSeries Website – http://www.ibm.com/iseries/db2 Sales Contacts – WW: Doug Mack: mackd@us.ibm.com – AG: Jackie Jansen: jjansen@ca.ibm.com – AP: Pony Ma: map@sg.ibm.com – EMEA: Petter Sommerfelt: PETTERS@uk.ibm.com Rochester DB2 Competency Center and ISV Enablement Team – RCHUDB@us.ibm.com Rochester IBM DB2 Query Optimization Services – IGS: Dan Heithoff – heithoff@us.ibm.com – CTC: Mark Even – even@us.ibm.com 27 © 2006 IBM Corporation