DB2 – Informix Terminology and Architecture Comparison By Pradeep Kutty Jan 30th, 2004 © 2004 IBM Corporation DB2 – Product Family Enterprise Server Edition (ESE) Enterprise Extended Edition (EEE) Version 8 Enterprise Workgroup Personal Edition (EE) Edition (WE) Edition (PE) Everyplace KCIIUG - 2004 © 2004 IBM Corporation Products Positioning Single Product line for all Applications –Common code base for UNIX and NT –Differentiation depending on target platform and licensing strategy Additional applications built upon the database server –Data warehouse –OLAP –Connectivity (DB2 Connect, Data Joiner) –Web enablement (Web Sphere Application Server) KCIIUG - 2004 © 2004 IBM Corporation Informix – Product Family 7.3x 9.5x 9.4x 9.3x 9.2x 7.2x 8.5x 9.1x 9.x 8.4x 7.1x 8.3x Online 7.x 8.2x Online 6.x Online 5.x XPS 8.x 8.1x Online 4.x SE / CISAM KCIIUG - 2004 © 2004 IBM Corporation Products Positioning IDS (7.x and 9.x): –OLTP –Data blades and Extensibility –Replication (HDR and ER) –Max Connect XPS (8.x) – –Data Ware Housing –Cluster support KCIIUG - 2004 © 2004 IBM Corporation Informix – Long Term 2002 2003 IDS: RAS, Ease-of-Use, Security 9.40 XPS: BI Tool Integration, Ease-of-Use 8.40 Red Brick: BI Tool Integration, Performance 6.2 KCIIUG - 2004 2004 2005 2006 9.50 8.50 7.1 9.60 8.60 7.2 © 2004 IBM Corporation Platforms Supported DB2 ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ XPS AIX NUMA-Q PTX Linux SUN Solaris HP UX Linux/390 (Not EEE) AS/400 OS/390 Windows OS/2 KCIIUG - 2004 ƒ ƒ ƒ ƒ ƒ IDS AIX NUMA-Q PTX Linux SUN Solaris HP UX ƒ AIX 32/64 Bit ƒ NUMA-Q PTX ƒ Linux Intel / Alpha ƒ SUN Solaris Intel / Sparc ƒ HP UX 32/64 Bit ƒ Compaq True Unix ƒ Reliant Unix ƒ Compaq True Unix ƒ Reliant Unix 32/64 Bit ƒ SCO Open Server ƒ SCO UNIXWARE 7 ƒ Windows NT / 2000 ƒ Tandem Nonstop UX C61 ƒ DEC TRU64 ƒ NCR ƒ Fujitsu/Siemens ƒ SGI 32/64 Bit ƒ Data General DGUX © 2004 IBM Corporation DB2 Architecture Applications Client TCP/IP or SHM and Semaphores or any Network Protocol Log Buffer Coordinator agent EDU Subagents EDU Log requests Server Prefetch Requests Prefetch Manager Prefetchers Buffer Pool Logger EDU Logs Deadlock Detector Read Req Page Cleaners Parallel Page write requests Containers KCIIUG - 2004 © 2004 IBM Corporation IDS/XPS Architecture Client Net VP LIO VP Shm VP CPU VP Resident PIO VP Virtual Communication AIO VP Disks Logs IDS only Ext VP Other VPs: ADM, ADT, Java, etc. KCIIUG - 2004 © 2004 IBM Corporation Process vs. Thread “In Solaris, creating a process is about 30 times slower than creating a thread, synchronization variables are about 10 times slower, and context switching about 5 times slower.” Thread Primer Page 21 KCIIUG - 2004 © 2004 IBM Corporation Terminology DB2 IDS/XPS –Instance –Instance –Database –Database –Partition/Node –Co-server –Node group –Co-group –Table space –Dbslices, Dbspace –Container –Chunks KCIIUG - 2004 © 2004 IBM Corporation Configuration DB2 –Instance Parameters controlled by DBM CFG –Every database has its own database configuration –Registry and Environment Variables –SQL SET command –Multi threaded only on NT Informix –Instance Parameters controlled by ONCONFIG –Environment Variables –SQL SET Command –Multi threaded on UNIX and NT KCIIUG - 2004 © 2004 IBM Corporation Storage DB2 (table spaces) –System Managed Storage (SMS) –Database Managed Storage (DMS) • • - Database Managed Storage • • Cooked Raw Files Devices –Configurable page size: 4KB, 8KB, 16KB, 32KB KCIIUG - 2004 IDS/XPS (db spaces) –IDS pre-defined page size –XPS configurable: 2KB, 4KB, 8KB © 2004 IBM Corporation Extent Allocation DB2 –Extent Size set at the table space level –Allocated in a round robin fashion among containers –Valid for all tables within the table space Informix –Extent size set at the table level –Allocated in a serial manner KCIIUG - 2004 © 2004 IBM Corporation Tables DB2 –One table per table space –Partitioning in a EEE environment –Two extents are allocated at table creation time • Extent map • Data extent Informix –Can span multiple db spaces (fragmentation) –First and next extent control extent sizing –Doubling after every 16 extents KCIIUG - 2004 © 2004 IBM Corporation Table Types DB2 Informix –Not logged initially –TEMP –Global Temp Table –Scratch (XPS) –Volatile Table –Raw (XPS) –Summary Tables –Static (XPS) –Operational (XPS) –Standard (XPS) KCIIUG - 2004 © 2004 IBM Corporation Row size DB2 IDS/XPS –Determined by the page size –32KB (page linking) –Out-of-row objects: • KCIIUG - 2004 BLOB, CLOB, DBCLOB, LONG VARCHAR, LONG VARGRAPHIC –(IDS) Out-of-row objects: • BLOB, BYTE, CLOB, TEXT © 2004 IBM Corporation Object Names Sizes Object Database name User name Table name Column name Index name Procedure name KCIIUG - 2004 DB2 8 8* 128 30 18 18 XPS 18 8 18 18 18 18 IDS 128 32 128 128 128 128 © 2004 IBM Corporation Memory Usage IDS/XPS –Instance memory shared by all databases (buffer pool, locks, heap, stack, sort, cache, etc) DB2 –Instance shared memory –Database shared memory (buffer pool, lock list, sort, heap, etc.) –Application shared memory –Agent private memory KCIIUG - 2004 © 2004 IBM Corporation Indexes DB2 Informix –Separate Table space than table (DMS) –Attached and Detached Indexes –Forward and Reverse Scans –B-Tree –B-Tree –R-Tree (IDS Only) –MDC Index –Functional (IDS Only) –Db2advis [Advisor] –Bitmap (XPS Only) –GK (XPS Only) KCIIUG - 2004 © 2004 IBM Corporation Locking DB2 Informix –Row level is the default –Specified at table creation –LOCK parameters include: LOCKLIST and MAXLOCKS –Default is page –LOCK escalation can occur based on parameter settings KCIIUG - 2004 –ONCONFIG Parameter: LOCKS –No Lock escalations © 2004 IBM Corporation Logical Logs DB2 Informix –Logs allocated at Database level –Logs allocated at Instance level –Primary and secondary logs –Default is No logging –Circular logging –Backed up using –Archival Logging –Backed up using USEREXIT • • ontape onbar –Dual logging –Infinite log space KCIIUG - 2004 © 2004 IBM Corporation Management [Analysis] Tools DB2 Informix –Control Center (backup, index, configuration wizards) –Alert center –Performance monitor –Snapshot Monitoring • • • • Locks BufferPools SQL Sort Operations –onstat –onparams –onspaces, etc. –ISA –I-SPY –Explain –Event Monitors –Explain [dynexplain/db2exfmt] KCIIUG - 2004 © 2004 IBM Corporation Utilities DB2 Informix –Import / Export –dbexport –REORGCHK –HPL –REORG –Unload –RUNSTATS –Load –db2look –Update statistics –Db2batch –dbschema –Load –External Table (XPS) –db2move KCIIUG - 2004 © 2004 IBM Corporation Backup / Restore DB2 Informix –Online –Level 0 –Offline –Level 1 –Incremental –Level 2 –Delta –EBR –Split Mirror –Imported Restore –Redirected Restore KCIIUG - 2004 © 2004 IBM Corporation Extensibility DB2 Types: IDS Types: –Distinct –Distinct –Structured –Row –Opaque DB2 Functions –Scalar –Table –Collection (set, list, …) IDS Functions: –Scalar –Iterator –Aggregate KCIIUG - 2004 © 2004 IBM Corporation Data Blades and Extenders DB2 Extenders IDS Data Blades –Spatial –Spatial/geodetic –XML –Time Series, NAG –Text –Text, image, video –Audio –Video –Image –Third parties IDS Bundles –Financial Foundation –Law Enforcement Foundation –Other to come KCIIUG - 2004 © 2004 IBM Corporation DB2 Future features Autonomic Computing 4GL and ESQL/C (SQLI) support IDS date types and functions IDS replication –HDR in V8.2 IDS fragmentation R-Tree Indexes Time Series Data blade KCIIUG - 2004 © 2004 IBM Corporation IDS – The Future 2006 Announced GA March 28th IDS 9.60 Backup 2005 2004 & Restore enhancements Driven by Customer High Availability Data Replication & Partner Requests working with ER Safety – High Remove Capacity Limitations Availability IDS >2gig chunk size XML Standards 9.50 Security Enhancements Compliance System Monitoring Enhancements In Planning: On-Line Reorg track causes of deadlocks Safety – High Availability Utility Enhancements Application Dev / XML / Stds. Compliance > 2gig file support 4GL with WebSphere 2003 IDS 9.40 Autonomic / Ease of Administration Software Group Integration Security Enhancements Partner Enhancements Infrastructure Improvements Performance, KCIIUG - 2004 / IDS Install, I-Star for Built-in UDTs © 2004 IBM Corporation Conclusion DB2 and IDS complement each other The synergy between development groups will accelerate technology migration both ways The IBM portfolio strengthens the Informix position The DB2 federated approach helps support dual environments KCIIUG - 2004 © 2004 IBM Corporation For Additional Information Web sites: –http://www.ibm.com/software/data/db2 –http://www.ibm.com/software/data/informix KCIIUG - 2004 © 2004 IBM Corporation Questions? KCIIUG - 2004 © 2004 IBM Corporation