ibm informixwarehouseaccelerator administration guideinformixsoftware.com/ids117/warehouse...

138
Informix Product Family Informix Warehouse Accelerator Version 11.70 IBM Informix Warehouse Accelerator Administration Guide SC27-3851-02

Upload: others

Post on 17-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Informix Product FamilyInformix Warehouse AcceleratorVersion 11.70

IBM Informix Warehouse AcceleratorAdministration Guide

SC27-3851-02

���

Page 2: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,
Page 3: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Informix Product FamilyInformix Warehouse AcceleratorVersion 11.70

IBM Informix Warehouse AcceleratorAdministration Guide

SC27-3851-02

���

Page 4: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

NoteBefore using this information and the product it supports, read the information in “Notices” on page E-1.

Edition

This edition replaces SC27-3851-01.

This document contains proprietary information of IBM. It is provided under a license agreement and is protectedby copyright law. The information contained in this publication does not include any product warranties, and anystatements provided in this manual should not be interpreted as such.

When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in anyway it believes appropriate without incurring any obligation to you.

© Copyright IBM Corporation 2010, 2012.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contractwith IBM Corp.

Page 5: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Contents

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vAbout this publication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

Types of users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vSoftware dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vAssumptions about your locale . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

What's new in the Informix Warehouse Accelerator, Version 11.70 . . . . . . . . . . . . . . . . . viExample code conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiAdditional documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixCompliance with industry standards . . . . . . . . . . . . . . . . . . . . . . . . . . . ixSyntax diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

How to read a command-line syntax diagram . . . . . . . . . . . . . . . . . . . . . . . xKeywords and punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiIdentifiers and names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii

How to provide documentation feedback . . . . . . . . . . . . . . . . . . . . . . . . . xii

Chapter 1. Overview of Informix Warehouse Accelerator . . . . . . . . . . . . . . 1-1Overview: Accelerating queries with Informix Warehouse Accelerator. . . . . . . . . . . . . . . . 1-3Informix Warehouse Accelerator architecture options . . . . . . . . . . . . . . . . . . . . . 1-4Informix Warehouse Accelerator internal architecture . . . . . . . . . . . . . . . . . . . . . 1-7Tools for administering Informix Warehouse Accelerator . . . . . . . . . . . . . . . . . . . . 1-8Java classes for Informix Warehouse Accelerator . . . . . . . . . . . . . . . . . . . . . . . 1-8Accelerated queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9

Queries that benefit from acceleration . . . . . . . . . . . . . . . . . . . . . . . . . 1-9Types of queries that are not accelerated . . . . . . . . . . . . . . . . . . . . . . . . 1-12

Supported data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12Supported functions and expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13Supported and unsupported joins . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15

Chapter 2. Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1Informix Warehouse Accelerator prerequisites and requirements . . . . . . . . . . . . . . . . . 2-1Informix Warehouse Accelerator directory structure . . . . . . . . . . . . . . . . . . . . . . 2-2Preparing the Informix database server . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3Installing Informix Warehouse Accelerator . . . . . . . . . . . . . . . . . . . . . . . . . 2-4Installing IBM Smart Analytics Optimizer Studio . . . . . . . . . . . . . . . . . . . . . . 2-5Uninstalling Informix Warehouse Accelerator . . . . . . . . . . . . . . . . . . . . . . . . 2-6Updating Informix Warehouse Accelerator . . . . . . . . . . . . . . . . . . . . . . . . . 2-6

Chapter 3. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1Configuring Informix Warehouse Accelerator . . . . . . . . . . . . . . . . . . . . . . . . 3-1Configuring Informix Warehouse Accelerator for hardware clusters . . . . . . . . . . . . . . . . 3-2Configuring Informix Warehouse Accelerator on secondary servers in a high-availability environment . . . . . 3-3dwainst.conf configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5Configuring memory for Informix Warehouse Accelerator . . . . . . . . . . . . . . . . . . . 3-8The ondwa utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11

Users who can run the ondwa commands . . . . . . . . . . . . . . . . . . . . . . . 3-11ondwa setup command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12ondwa start command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13ondwa status command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14ondwa getpin command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15ondwa tasks command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16ondwa stop command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16ondwa reset command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17ondwa clean command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17

Chapter 4. Creating an accelerator . . . . . . . . . . . . . . . . . . . . . . . 4-1

© Copyright IBM Corp. 2010, 2012 iii

Page 6: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 5. Data marts and AQTs . . . . . . . . . . . . . . . . . . . . . . . . 5-1Accelerated query tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1Data marts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2Create a data mart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5

Workload analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6Creating data mart definitions by using workload analysis . . . . . . . . . . . . . . . . . . 5-7Creating data mart definitions by using IBM Smart Analytics Optimizer Studio . . . . . . . . . . . 5-16

Deploy and load the data mart . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18Deploying and loading a data mart by using IBM Smart Analytics Optimizer Studio . . . . . . . . . 5-19

Refreshing the data in a data mart . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20Refreshing all the data in a data mart . . . . . . . . . . . . . . . . . . . . . . . . . 5-20Refreshing data mart data at the partition level . . . . . . . . . . . . . . . . . . . . . . 5-21Refreshing data mart data in a table . . . . . . . . . . . . . . . . . . . . . . . . . 5-26dropPartMart() function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26loadPartMart() function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27

Managing a data mart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28Dropping a data mart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29

Chapter 6. Turning on query acceleration . . . . . . . . . . . . . . . . . . . . 6-1use_dwa environment variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

Chapter 7. IBM Smart Analytics Optimizer Studio . . . . . . . . . . . . . . . . . 7-1Interface elements of IBM Smart Analytics Optimizer Studio. . . . . . . . . . . . . . . . . . . 7-1

Menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5Data Source Explorer window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5Data Project Explorer window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8Data mart editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10Outline view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12Properties view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14

Chapter 8. Reversion requirements for an Informix warehouse edition server andInformix Warehouse Accelerator . . . . . . . . . . . . . . . . . . . . . . . . 8-1

Chapter 9. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1Missing sbspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1Ensuring a result set includes the most current data . . . . . . . . . . . . . . . . . . . . . 9-1

Appendix A. Sample warehouse schema. . . . . . . . . . . . . . . . . . . . . A-1

Appendix B. Sysmaster interface (SMI) pseudo tables for query probing data. . . . . B-1

Appendix C. Supported locales . . . . . . . . . . . . . . . . . . . . . . . . . C-1

Appendix D. Accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1Accessibility features for IBM Informix products . . . . . . . . . . . . . . . . . . . . . . D-1

Accessibility features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1Keyboard navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1Related accessibility information . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1IBM and accessibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1

Dotted decimal syntax diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1

Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-3

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1

iv IBM Informix Warehouse Accelerator Administration Guide

Page 7: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Introduction

About this publicationThis publication contains comprehensive information about using IBM® Informix®

Warehouse Accelerator to process data warehouse queries more quickly thanprocessing the queries using the Informix database server.

Types of usersThis publication is written for the following users:v Database administratorsv System administratorsv Performance engineersv Application developers

This publication is written with the assumption that you have the followingbackground:v A working knowledge of your computer, your operating system, and the utilities

that your operating system providesv Some experience working with relational and dimensional databases or exposure

to database conceptsv Some experience with database server administration, operating-system

administration, network administration, or application development

You can access the Informix information centers, as well as other technicalinformation such as technotes, white papers, and IBM Redbooks® publicationsonline at http://www.ibm.com/software/data/sw-library/.

Software dependenciesThis publication is written with the assumption that you are using IBM InformixVersion 11.70.xC2 or later as your database server.

Assumptions about your localeIBM Informix products can support many languages, cultures, and code sets. Allthe information related to character set, collation and representation of numericdata, currency, date, and time that is used by a language within a given territoryand encoding is brought together in a single environment, called a GlobalLanguage Support (GLS) locale.

The IBM Informix OLE DB Provider follows the ISO string formats for date, time,and money, as defined by the Microsoft OLE DB standards. You can override thatdefault by setting an Informix environment variable or registry entry, such asDBDATE.

The examples in this publication are written with the assumption that you areusing one of these locales: en_us.8859-1 (ISO 8859-1) on UNIX platforms oren_us.1252 (Microsoft 1252) in Windows environments. These locales support U.S.English format conventions for displaying and entering date, time, number, andcurrency values. They also support the ISO 8859-1 code set (on UNIX and Linux)

© Copyright IBM Corp. 2010, 2012 v

Page 8: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

or the Microsoft 1252 code set (on Windows), which includes the ASCII code setplus many 8-bit characters such as é, è, and ñ.

You can specify another locale if you plan to use characters from other locales inyour data or your SQL identifiers, or if you want to conform to other collationrules for character data.

What's new in the Informix Warehouse Accelerator, Version 11.70This publication includes information about new features and changes in existingfunctionality.

For a complete list of what's new in this release, see the release notes or theinformation center at http://publib.boulder.ibm.com/infocenter/idshelp/v117/topic/com.ibm.po.doc/new_features.htm.

Table 1. What's New in IBM Informix Warehouse Accelerator Administration Guide for IBM Informix Version 11.70.xC6.

Overview Reference

Refresh dimension-table data without reloading the whole datamart

You can now refresh data in both the dimension tables and thefact tables when you drop and load a table partition in IBMInformix Warehouse Accelerator. Use the dropPartMart() andloadPartMart() functions to refresh the data mart data at thepartition level. Previously, you could refresh the data only in thefact tables.

“Refreshing data mart data at the partition level”on page 5-21

“Refreshing data mart data in a table” on page5-26

Table 2. What's New in IBM Informix Warehouse Accelerator Administration Guide for IBM Informix Version 11.70.xC5.

Overview Reference

Refresh data quickly without reloading the whole data mart

By using the dropPartMart() and loadPartMart() functions, youcan drop and load a table partition in Informix WarehouseAccelerator. In previous versions of Informix WarehouseAccelerator if the data on the database server changes, you mustreload the entire data mart. Now you can selectively refresh thepartitions and load the new data more quickly. For example, ifyou have a terabyte-size data warehouse already loaded inInformix Warehouse Accelerator and 10 GB of the data changes incertain partitions, you can reload only the changed data.

“Refreshing data mart data at the partition level”on page 5-21

Use high-availability secondary servers to accelerate queries

You can now use high-availability secondary servers to createdata marts, load data, and accelerate queries. By using secondaryservers for Informix Warehouse Accelerator, you have greaterflexibility in a mixed-workload environment. For example, youcan dedicate the primary server for OLTP transactions and use asecondary server for processing the warehouse analytic queries.By using secondary servers for Informix Warehouse Accelerator,you can increase the availability and the throughput for all theservers in the high-availability cluster.

“Configuring Informix Warehouse Accelerator onsecondary servers in a high-availabilityenvironment” on page 3-3

vi IBM Informix Warehouse Accelerator Administration Guide

Page 9: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 2. What's New in IBM Informix Warehouse Accelerator Administration Guide for IBM Informix Version11.70.xC5. (continued)

Overview Reference

New options added for the use_dwa environment variable

The use_dwa environment variable includes new options forcontrolling the database client connection to the Informixdatabase server. You can now specify settings for a particularsession, control whether queries are run by the Informix databaseserver if they cannot be accelerated by Informix WarehouseAccelerator, and specify a debugging file other than the defaultonline.log file.

“use_dwa environment variable” on page 6-1

Support for new functions is implemented

v LEN

v LENGTH

v SUBSTR

v SUBSTRING

v TODAY

v TRIM

v YEAR

“Supported functions and expressions” on page1-13

Support for the Solaris Intel x64 operating system added

Informix Warehouse Accelerator now supports query accelerationfor database servers that are installed on the Solaris Intel x64operating system.

Informix Warehouse Accelerator SystemRequirements: http://www.ibm.com/support/docview.wss?rs=630&uid=swg27021332

Table 3. What's New in IBM Informix Warehouse Accelerator Administration Guide for IBM Informix Version 11.70.xC4.

Overview Reference

Install Informix Warehouse Accelerator on a cluster system

You can now install Informix Warehouse Accelerator on a clustersystem. Using a hardware cluster for Informix WarehouseAccelerator takes advantage of the parallel processing power ofmultiple cluster nodes. The accelerator coordinator node and eachworker node can run on a different cluster node. The InformixWarehouse Accelerator software and data are shared in the clusterfile system. You can administer Informix Warehouse Acceleratorfrom any node in the cluster.

“Configuring Informix Warehouse Accelerator forhardware clusters” on page 3-2

Refresh data mart data during query acceleration

You can now refresh data in the Informix Warehouse Acceleratorwhile queries are accelerated. You no longer need to suspendquery acceleration in order to drop and re-create the original datamart. Using the existing administrator tools, you create a newdata mart that has the same data mart definition as the originaldata mart, but has a different name. You can then load the newdata mart while query acceleration still uses the original datamart. After the new data mart is loaded, the acceleratorautomatically uses the new data mart with the latest data toaccelerate queries.

“Refreshing all the data in a data mart” on page5-20

User informix can run the ondwa commands

The ondwa commands can now be run by user informix providedthat the shell limits are set correctly.

“Users who can run the ondwa commands” onpage 3-11

Introduction vii

Page 10: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 3. What's New in IBM Informix Warehouse Accelerator Administration Guide for IBM Informix Version11.70.xC4. (continued)

Overview Reference

Support for new functions is implemented

v DECODE

v NVL

v TRUNC

“Supported functions and expressions” on page1-13

New options for monitoring AQTs

New columns have been added to the output of the onstat -g aqtcommand that include counters for candidate AQTs.

onstat -g aqt command.

Table 4. What's New in IBM Informix Warehouse Accelerator Administration Guide for IBM Informix Version 11.70.xC3

Overview Reference

Create data mart definitions automatically

Creating data mart definitions is one of the more time-consumingtasks in setting up Informix Warehouse Accelerator. You can use anew capability in Informix Warehouse Accelerator toautomatically create the data mart definitions for you. Thiscapability is especially useful if there are a very large number oftables in your database and using the IBM Smart AnalyticsOptimizer Studio to create the data mart definitions iscumbersome. It is also useful when you are not intimatelyfamiliar with the table schemas in your database.

“Creating data mart definitions by using IBMSmart Analytics Optimizer Studio” on page 5-16

Additional locales supported

Previously Informix Warehouse Accelerator supported only thedefault locale en_us.8859-1. Additional locales are now supported.

Appendix C, “Supported locales,” on page C-1

Example code conventionsExamples of SQL code occur throughout this publication. Except as noted, the codeis not specific to any single IBM Informix application development tool.

If only SQL statements are listed in the example, they are not delimited bysemicolons. For instance, you might see the code in the following example:CONNECT TO stores_demo...

DELETE FROM customerWHERE customer_num = 121

...

COMMIT WORKDISCONNECT CURRENT

To use this SQL code for a specific product, you must apply the syntax rules forthat product. For example, if you are using an SQL API, you must use EXEC SQLat the start of each statement and a semicolon (or other appropriate delimiter) atthe end of the statement. If you are using DB–Access, you must delimit multiplestatements with semicolons.

viii IBM Informix Warehouse Accelerator Administration Guide

Page 11: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Tip: Ellipsis points in a code example indicate that more code would be added ina full application, but it is not necessary to show it to describe the concept beingdiscussed.

For detailed directions on using SQL statements for a particular applicationdevelopment tool or SQL API, see the documentation for your product.

Additional documentationDocumentation about this release of IBM Informix products is available in variousformats.

You can access or install the product documentation from the Quick Start GuideCD that is shipped with Informix products. To get the most current information,see the Informix information centers at ibm.com®. You can access the informationcenters and other Informix technical information such as technotes, white papers,and IBM Redbooks publications online at http://www.ibm.com/software/data/sw-library/.

Compliance with industry standardsIBM Informix products are compliant with various standards.

IBM Informix SQL-based products are fully compliant with SQL-92 Entry Level(published as ANSI X3.135-1992), which is identical to ISO 9075:1992. In addition,many features of IBM Informix database servers comply with the SQL-92Intermediate and Full Level and X/Open SQL Common Applications Environment(CAE) standards.

The IBM Informix Geodetic DataBlade® Module supports a subset of the data typesfrom the Spatial Data Transfer Standard (SDTS)—Federal Information ProcessingStandard 173, as referenced by the document Content Standard for GeospatialMetadata, Federal Geographic Data Committee, June 8, 1994 (FGDC MetadataStandard).

Syntax diagramsSyntax diagrams use special components to describe the syntax for statements andcommands.

Table 5. Syntax Diagram Components

Component represented in PDF Component represented in HTML Meaning

>>---------------------- Statement begins.

-----------------------> Statement continues on nextline.

>----------------------- Statement continues fromprevious line.

----------------------->< Statement ends.

--------SELECT---------- Required item.

Introduction ix

Page 12: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 5. Syntax Diagram Components (continued)

Component represented in PDF Component represented in HTML Meaning

--+-----------------+---’------LOCAL------’

Optional item.

---+-----ALL-------+---+--DISTINCT-----+’---UNIQUE------’

Required item with choice.Only one item must bepresent.

---+------------------+---+--FOR UPDATE-----+’--FOR READ ONLY--’

Optional items with choiceare shown below the mainline, one of which you mightspecify.

.---NEXT---------.----+----------------+---

+---PRIOR--------+’---PREVIOUS-----’

The values below the mainline are optional, one ofwhich you might specify. Ifyou do not specify an item,the value above the line isused by default.

.-------,-----------.V |---+-----------------+---

+---index_name---+’---table_name---’

Optional items. Several itemsare allowed; a comma mustprecede each repetition.

>>-| Table Reference |->< Reference to a syntaxsegment.

Table Reference

|--+-----view--------+--|+------table------+’----synonym------’

Syntax segment.

How to read a command-line syntax diagramCommand-line syntax diagrams use similar elements to those of other syntaxdiagrams.

Some of the elements are listed in the table in Syntax Diagrams.

Creating a no-conversion job

�� onpladm create job job-p project

-n -d device -D database �

� -t table �

x IBM Informix Warehouse Accelerator Administration Guide

Page 13: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

� �(1)

Setting the Run Mode-S server -T target

��

Notes:

1 See page Z-1

This diagram has a segment named “Setting the Run Mode,” which according tothe diagram footnote is on page Z-1. If this was an actual cross-reference, youwould find this segment on the first page of Appendix Z. Instead, this segment isshown in the following segment diagram. Notice that the diagram uses segmentstart and end components.

Setting the run mode:

-fdpa

lc

u n N

To see how to construct a command correctly, start at the upper left of the maindiagram. Follow the diagram to the right, including the elements that you want.The elements in this diagram are case-sensitive because they illustrate utilitysyntax. Other types of syntax, such as SQL, are not case-sensitive.

The Creating a No-Conversion Job diagram illustrates the following steps:1. Type onpladm create job and then the name of the job.2. Optionally, type -p and then the name of the project.3. Type the following required elements:

v -n

v -d and the name of the devicev -D and the name of the databasev -t and the name of the table

4. Optionally, you can choose one or more of the following elements and repeatthem an arbitrary number of times:v -S and the server namev -T and the target server namev The run mode. To set the run mode, follow the Setting the Run Mode

segment diagram to type -f, optionally type d, p, or a, and then optionallytype l or u.

5. Follow the diagram to the terminator.

Keywords and punctuationKeywords are words reserved for statements and all commands exceptsystem-level commands.

Introduction xi

Page 14: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

When a keyword appears in a syntax diagram, it is shown in uppercase letters.When you use a keyword in a command, you can write it in uppercase orlowercase letters, but you must spell the keyword exactly as it appears in thesyntax diagram.

You must also use any punctuation in your statements and commands exactly asshown in the syntax diagrams.

Identifiers and namesVariables serve as placeholders for identifiers and names in the syntax diagramsand examples.

You can replace a variable with an arbitrary name, identifier, or literal, dependingon the context. Variables are also used to represent complex syntax elements thatare expanded in additional syntax diagrams. When a variable appears in a syntaxdiagram, an example, or text, it is shown in lowercase italic.

The following syntax diagram uses variables to illustrate the general form of asimple SELECT statement.

�� SELECT column_name FROM table_name ��

When you write a SELECT statement of this form, you replace the variablescolumn_name and table_name with the name of a specific column and table.

How to provide documentation feedbackYou are encouraged to send your comments about IBM Informix userdocumentation.

Use one of the following methods:v Send email to [email protected] In the Informix information center, which is available online at

http://www.ibm.com/software/data/sw-library/, open the topic that you wantto comment on. Click the feedback link at the bottom of the page, fill out theform, and submit your feedback.

v Add comments to topics directly in the information center and read commentsthat were added by other users. Share information about the productdocumentation, participate in discussions with other users, rate topics, andmore!

Feedback from all methods is monitored by the team that maintains the userdocumentation. The feedback methods are reserved for reporting errors andomissions in the documentation. For immediate help with a technical problem,contact IBM Technical Support at http://www.ibm.com/planetwide/.

We appreciate your suggestions.

xii IBM Informix Warehouse Accelerator Administration Guide

Page 15: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 1. Overview of Informix Warehouse Accelerator

Informix Warehouse Accelerator is a product that you use to improve theperformance of your warehouse queries.

Informix Warehouse Accelerator processes warehouse queries more quickly thanthe Informix database server. Informix Warehouse Accelerator improvesperformance while at the same time reduces administration. There are only a fewconfiguration parameters that you need to set to tune query performance. You caninstall Informix Warehouse Accelerator on same computer as the Informix databaseserver, as shown in the following figure. You can also install Informix WarehouseAccelerator on a separate computer.

Informix Warehouse Accelerator is optimal for processing data warehouse queries.The demands of data warehouse queries are substantially different from onlinetransactional processing (OLTP) queries. A typical data warehouse query requiresthe processing of a large set of data and returns a small result set.

The overhead required to accelerate a query and return a result set is negligiblecompared with the benefits of using Informix Warehouse Accelerator:v Informix Warehouse Accelerator uses a copy of the data.v To expedite query processing, the copy of the data is kept in memory in a

special compressed format. Advances in compression techniques, queryprocessing on compressed data, and hybrid columnar organization ofcompressed data enable Informix Warehouse Accelerator to query thecompressed data.

Clientapplication

Clientapplication

Clientapplication

Clientconnectivity

Informix serverInformix WarehouseAccelerator

Figure 1-1. Informix Warehouse Accelerator installed on the same computer as the Informixdatabase server.

© Copyright IBM Corp. 2010, 2012 1-1

Page 16: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v The data is compressed and kept in memory by Informix Warehouse Acceleratorto maximize parallel query processing.

In addition to the performance gain of the warehouse query itself, the resources onthe database server can be better used for other types of queries, such as OLTPqueries, which perform more efficiently on the database server.

You can use Informix Warehouse Accelerator with an Informix database server thatsupports a mixed workload OLTP database and a data warehouse database, or useit with a database server that supports only a data warehouse database. However,before you use Informix Warehouse Accelerator you must design and implement adimensional database that uses a star or snowflake schema for your datawarehouse. This design includes selecting the business subject areas that you wantto model, determining the granularity of the fact tables, and identifying thedimensions and hierarchies for each fact table. Additionally, you must identify themeasures for the fact tables and determine the attributes for each dimension table.

The following figure shows a sample snowflake schema with a fact table andmultiple dimension tables.

An accelerator server is an installation of Informix Warehouse Accelerator.

The accelerator server contains one or more accelerators. An accelerator is a logicalentity that contains information for a connection from the database server to theaccelerator server and for the data marts associated with that connection. A datamart specifies the collection of tables from a database that are loaded into anaccelerator and the relationships, or references, between these tables. After youcreate a data mart, information about the data mart is sent to the database serverin the form of a special view called an accelerated query table or AQT. The databaseserver uses the AQTs to determine which queries can be accelerated.

DAILY_SALESfact table

STORE

CUSTOMER

CONTACT

PRODUCT

PERIOD

CITY

REGION

ADDRESS

DEMOGRAPHICS PROMOTION

BRAND

QUARTER

PRODUCT_LINE

MONTH

Figure 1-2. A sample snowflake schema that has the DAILY_SALES table as the fact table.

1-2 IBM Informix Warehouse Accelerator Administration Guide

Page 17: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Overview: Accelerating queries with Informix Warehouse AcceleratorYou can set up query acceleration with Informix Warehouse Accelerator byfollowing a few installation and configuration steps. Before you begin, plan theinstallation by reviewing the architecture and administration options.

Determine the best installation architecture for your business needs and yourhardware. You can install Informix Warehouse Accelerator on the same computeras the Informix database server, on a different computer, or on a hardware cluster.Review the installation prerequisites and requirements and determine which toolyou want to use to administer Informix Warehouse Accelerator.1. Install, start, and prepare the database server for Informix Warehouse

Accelerator.Ensure that user informix has write access to the sqlhosts file and set up adefault sbspace.

2. Design and implement a dimensional database that uses a star or snowflakeschema. Confirm that the database uses the data types, functions, expressions,and joins that are supported by Informix Warehouse Accelerator.

3. Install Informix Warehouse Accelerator.4. Select a tool for administering Informix Warehouse Accelerator.

You can use IBM Smart Analytics Optimizer Studio or run Java™ classes fromthe command line.

5. Configure the accelerator server.Identify the network interface, create a storage directory, and edit thedwainst.conf configuration file. You then run the ondwa setup command tocreate the files and subdirectories that are required to run the accelerator server.You run the ondwa start command to start the accelerator server nodes.

6. Connect the accelerator server to the database server by creating an accelerator.You can use Smart Analytics Optimizer Studio to create an accelerator.

7. Create and load a data mart.You can use any of the administration tools to create and load a data mart.Workload analysis provides the most comprehensive method for designing aneffective data mart.

8. Turn on query acceleration by setting the use_dwa environment variable.You run an SQL statement from the database client to set the use_dwaenvironment variable.

Now your queries can be accelerated. The client application sends queries to thedatabase server. The SQL optimizer on the database server matches the queriesthat can be accelerated to the AQTs and sends the queries to the accelerator server.The results are returned to the database server, which sends them to the clientapplication.

Chapter 1. Overview of Informix Warehouse Accelerator 1-3

Page 18: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:Chapter 2, “Installation,” on page 2-1Chapter 3, “Configuration,” on page 3-1Chapter 5, “Data marts and AQTs,” on page 5-1“Tools for administering Informix Warehouse Accelerator” on page 1-8

Informix Warehouse Accelerator architecture optionsThere are several approaches that you can use to integrate Informix WarehouseAccelerator into your current system architecture.

You can install the accelerator server on the same computer as your Informixdatabase server, on a separate computer, or on a cluster. There must be a TCP/IPconnection between the database server and the accelerator server. If theaccelerator server is installed on the same computer as the database server, theconnection must be a local loop-back TCP/IP connection.

If the Informix database server is installed in a high-availability clusterenvironment, you can also reduce the workload on the primary server by usingone or more of the secondary servers to accelerate queries. You can also install theaccelerator server on a secondary server.

The query optimizer on the database server identifies which data warehousequeries can be accelerated and sends those queries to the accelerator server. Theresult set is sent back to the database server, which passes the result set back to theclient. If the query cannot be processed by the accelerator server, the query isprocessed on the database server.

You can use an administration tool called IBM Smart Analytics Optimizer Studioadminister Informix Warehouse Accelerator. The administration tasks areimplemented as a set of stored procedures that are called through the SmartAnalytics Optimizer Studio interface.

The accelerator server and the database server on the samecomputer

The following figure shows the accelerator server and the database server installedon the same computer.

1-4 IBM Informix Warehouse Accelerator Administration Guide

Page 19: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

The accelerator server and the database server on differentcomputers

The following figure shows the accelerator server and the database server installedon different computers.

SQL query

Informix database server

Optimizer

No

Result set

Yes

Administrator interface

UseAccelerator?

Informix WarehouseAccelerator

Local loopbackTCP/IP

connection

Client

Symmetric multiprocessing system

Acceleratoradministrator

interface

Figure 1-3. The accelerator server and the database server installed on the same computer.

Chapter 1. Overview of Informix Warehouse Accelerator 1-5

Page 20: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

The accelerator server installed on a cluster system

The following figure shows the accelerator server installed on a cluster and thedatabase server installed on a separate computer.

SQL query

Informix database server

Optimizer

No

Result set

YesUseAccelerator?

Linux 64-bit Intelprocessor

TCP/IPconnection

Client

Symmetricmultiprocessing system

Acceleratoradministratorinterface

InformixWarehouseAccelerator

Administratorstored

procedures

Figure 1-4. The accelerator server and the database server installed on different computers.

1-6 IBM Informix Warehouse Accelerator Administration Guide

Page 21: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Informix Warehouse Accelerator internal architectureThe accelerator server consists of two or more nodes, which are processes that runin the Linux operating system.

The nodes use main memory and disk space. By default, the accelerator server hasone coordinator node and one worker node. The main memory is divided intoshared memory for the coordinator node, shared memory for the worker node, andprivate memory that is used by the processes and their threads on an as-neededbasis.

The coordinator node manages the requests from the database server such asloading data and running queries. The database server and the ondwa utilityconnect to the coordinator node. The coordinator node communicates with theworker node. The worker node has all of the data in main memory in acompressed format and processes the queries. You can configure more workernodes to obtain higher parallelism for certain environments.

The processes are multithreaded so parallelization is in effect even when there isonly one coordinator and one worker node. You use the ondwa utility to start theaccelerator server nodes.

SQL query

Informix database server

Optimizer

No

Result set

UseAccelerator?

TCP/IPconnection

Client

Symmetricmultiprocessing system

Yes

Acceleratoradministratorinterface

Cluster withInformix Warehouse

Accelerator

Administratorstored

procedures

Figure 1-5. The accelerator server installed on a cluster system and the database serverinstalled on a separate computer.

Chapter 1. Overview of Informix Warehouse Accelerator 1-7

Page 22: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

The following figure shows that the database server communicates with theworker nodes through the coordinator node, and describes the roles of thedatabase server, the coordinator node, and the worker nodes.

Tools for administering Informix Warehouse AcceleratorYou can use these tools to administer Informix Warehouse Accelerator.

All the tools work through a database connection from the database server to theaccelerator server. They do not interact directly with the accelerator server.v IBM Smart Analytics Optimizer Studio is an Eclipse-based interface that uses a

set of stored procedures in the Informix database server. Smart AnalyticsOptimizer Studio is included with the Informix Warehouse Accelerator software.You install Smart Analytics Optimizer Studio on a separate computer from theaccelerator server.

v Java classes are included in the Informix Warehouse Accelerator software. Youcan use the Java classes from the command line or in scripts so that you canautomate tasks.

Related concepts:Chapter 7, “IBM Smart Analytics Optimizer Studio,” on page 7-1“Java classes for Informix Warehouse Accelerator”

Java classes for Informix Warehouse AcceleratorInformix Warehouse Accelerator includes a set of Java classes that you can usefrom the command line or in an application.

You can use the Java classes to create and drop data marts, update connectivityinformation between the Informix database server and the accelerator server, andmore. You can use the classes to automate the steps for refreshing the data storedin the data marts. Instead of dropping and re-creating the data marts manually,you can create an application that runs when it is convenient for yourorganization.

The files for the Java classes are in this directory: dwa/example/cli. The directoryincludes the following files:

Informix database server Accelerator Server

Performs the query parsingand AQT matching.The Optimizer routes the queryblocks.

Coordinator node Worker nodes

Manages the distributionof tasks such as loadingdata and queryprocessing.

Compress the data and storeit in main memory spreadacross all of the acceleratorserver nodes. Perform queryprocessing.

Figure 1-6. A sample accelerator node architecture with one coordinator node and fourworker nodes.

1-8 IBM Informix Warehouse Accelerator Administration Guide

Page 23: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

conn.prop.stdTemplate for the connection properties file.

dwa_java_quickref.txtLists the requirements and setup steps with examples. Also lists the classesand usage.

dwa_java_reference.txtProvides the full syntax for all the classes. Includes recommendations andexample XML schemas.

dwa_message_reference.txtLists the messages in numerical order. These messages are not exclusive tothe Java classes. They might be displayed when you use otheradministration tools for Informix Warehouse Accelerator.

dwacli.jarContains the executable code for the Java classes.

env.stdTemplate for setting the CLASSPATH environment variable.

Accelerated queriesThe characteristics of a query determine if the query can be processed by theaccelerator server. Some queries cannot be accelerated.

A query can be sent to the accelerator server for processing only if the followingconditions are met:v The query refers to the fact table.v The query refers to a subset of the tables in the data mart definition.v The table joins that are in the query match the table joins that are specified in

the data mart definition.

Queries that benefit from accelerationThe database server uses information about the existing data marts to determinewhich types of queries should be sent to the accelerator server for processing.

Only SELECT queries that refer to a fact table, or SELECT queries that join a facttable with one or more dimension tables are processed by the accelerator server.

The following types of queries will benefit the most from being sent to theaccelerator server:v Complex, ad hoc queries that look for trends or exceptions to make workable

business decisionsv Queries that access a large subset of the database, often by using sequential

scansv Queries that involve aggregation functions such as COUNT, SUM, AVG, MAX,

MIN, and VARIANCEv Queries that often create reports that group data by time, product, geography,

customer set, or marketv Queries that involve star joins or snowflake joins of a large fact table with

several dimension tables

Chapter 1. Overview of Informix Warehouse Accelerator 1-9

Page 24: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:“Types of queries that are not accelerated” on page 1-12

Analyze queries for accelerationAnalyze the characteristics of your queries to understand if they can beaccelerated.

If a query matches an AQT, the query is sent to the accelerator server. This processis called acceleration. The results are then returned from the accelerator server to theInformix database server. Different types of queries are more or less suitable foracceleration.

Consideration Description

Does the query reference only the tables andcolumns that are included in the data martdefinition?

Only queries that include the supported datatypes can be accelerated.

Does the query reference a table that ismarked as a fact table in the data martdefinition?

Is the query a long-running analyticalquery? For example, a query that returnsonly a few rows by using a selectivecondition on an indexed column.

Does the query use only supported jointypes?

Do the join sequence and the join predicatesof the query match the definition of theaccelerated query table (AQT)?

Equality join predicates, INNER joins, andLEFT OUTER joins are the supported jointypes.

The fact table referenced in the query mustbe on the left side of the LEFT OUTER join.

You need to know the joins that aresupported and unsupported.

Does the query use only supportedaggregate and scalar functions?

Only queries that include the supportedfunctions can be accelerated.

Does the workload include OLTP queries? Exclude the OLTP queries. Analyze theremaining queries to determine whichcolumns in the dimension tables are beingused by the queries.

Do the queries use large dimension tables? Identify specific columns in the tables toload into the data mart instead of loading allof the columns from each table.

Query Example: Quantity, revenue, and cost by itemThis example shows, for a given category, all of the items including quantity sold,revenue, and cost.SELECT ITEM_DESC,

SUM(QUANTITY_SOLD),SUM(EXTENDED_PRICE),SUM(EXTENDED_COST)

FROM PERIOD, DAILY_SALES,PRODUCT, STORE, PROMOTIONWHEREPERIOD.PERKEY=DAILY_SALES.PERKEY ANDPRODUCT.PRODKEY=DAILY_SALES.PRODKEY ANDSTORE.STOREKEY=DAILY_SALES.STOREKEY ANDPROMOTION.PROMOKEY=DAILY_SALES.PROMOKEY ANDCALENDAR_DATE BETWEEN ’2011/01/01’ AND ’2011/01/31’ ANDSTORE_NUMBER=01 AND

1-10 IBM Informix Warehouse Accelerator Administration Guide

Page 25: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

PROMODESC IN (’Advertisement’, ’Coupon’, ’Weekly Special’,’Overstocked Items’) AND

CATEGORY=42GROUP BY ITEM_DESC;

Query Example: Profit by storeThis example shows the profit by store for a given category on a given day.SELECT T1.STORE_NUMBER,T1.CITY,T1.DISTRICT,SUM(AMOUNT) AS SUM_PROFITFROM

(SELECT STORE_NUMBER,STORE.CITY,DISTRICT, EXTENDED_PRICE-EXTENDED_COSTFROM PERIOD, PRODUCT,STORE, DAILY_SALESWHERE

PERIOD.CALENDAR_DATE=3/1/2011 ANDPERIOD.PERKEY=DAILY_SALES.PERKEY ANDPRODUCT.PRODKEY=DAILY_SALES.PRODKEY ANDSTORE.STOREKEY=DAILY_SALES.STOREKEY ANDPRODUCT.CATEGORY=42 ) AS T1(STORE_NUMBER,CITY,DISTRICT,AMOUNT)

GROUP BY DISTRICT,CITY, STORE_NUMBERORDER BY DISTRICT,CITY, STORE_NUMBER DESC;

Query Example: Revenue by store for each brandThis example takes the revenue for each brand and calculates the revenue by store.

Products are grouped by store, current week, prior week, and prior month totals.SELECT STORE_NUMBER,

SUM(CASE WHEN ((CALENDAR_DATE >= 8/8/2010)AND (CALENDAR_DATE < 8/14/2010))

THEN EXTENDED_PRICE ELSE 0 END) AS CURR_PERIOD,SUM(CASE WHEN ((CALENDAR_DATE >= 8/1/2010)

AND (CALENDAR_DATE <= 8/7/2010))THEN EXTENDED_PRICE ELSE 0 END) AS PRIOR_WEEK,

SUM(CASE WHEN ((CALENDAR_DATE >= 7/1/2010)AND (CALENDAR_DATE <= 7/28/2010))

THEN EXTENDED_PRICE ELSE 0 END) AS PRIOR_MONTHFROM PERIOD,PRODUCT,DAILY_SALES,STOREWHERE PRODUCT.PRODKEY=DAILY_SALES.PRODKEY

AND PERIOD.PERKEY=DAILY_SALES.PERKEYAND STORE.STOREKEY=DAILY_SALES.STOREKEYAND CALENDAR_DATE BETWEEN 7/1/2010 and 8/14/2010AND ITEM_DESC LIKE ’NESTLE%’

GROUP BY STORE_NUMBERORDER BY STORE_NUMBER;

Query Example: Week to day profitsThis example shows the week to day profits for a given category within region.SELECT FIRST 100 SUB_CATEGORY_DESC,

SUM(CASE REGION WHEN ’North’THEN EXTENDED_PRICE-EXTENDED_COST ELSE 0END) AS NORTHERN_REGION,

SUM(CASE REGION WHEN ’South’THEN EXTENDED_PRICE-EXTENDED_COST ELSE 0END) AS SOUTHERN_REGION,

SUM(CASE REGION WHEN ’East’THEN EXTENDED_PRICE-EXTENDED_COST ELSE 0END) AS EASTERN_REGION,

SUM(CASE REGION WHEN ’West’THEN EXTENDED_PRICE-EXTENDED_COST ELSE 0END) AS WESTERN_REGION,

SUM(CASE WHEN REGION IN (’North’, ’South’, ’East’, ’West’)THEN EXTENDED_PRICE-EXTENDED_COST ELSE 0END) as ALL_REGIONS

FROM PERIOD per, PRODUCT prd, STORE st, DAILY_SALES sWHERE

per.PERKEY=s.PERKEY AND

Chapter 1. Overview of Informix Warehouse Accelerator 1-11

Page 26: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

prd.PRODKEY=s.PRODKEY ANDst.STOREKEY=s.STOREKEY ANDper.CALENDAR_DATE BETWEEN ’07/01/2010’ AND ’09/30/2010’ANDCATEGORY<>88

GROUP BY SUB_CATEGORY_DESCORDER BY SUB_CATEGORY_DESC;

Types of queries that are not acceleratedThere are characteristics of queries that either will not benefit from being sent tothe accelerator server, or will not be considered for acceleration.

Queries that will not benefit from being accelerated

Queries that only refer to a single, small dimension table do not benefit from beingsent to the accelerator server for processing as much as queries that also refer to afact table.

Queries that return a large result set should be processed by the database server toavoid the overhead of sending the large result set from the accelerator server overthe connection to the database server. If a query returns millions of rows, the totalresponse time of the query is influenced by the maximum transfer rate of theconnection. For example, the following query might return a very large result set:SELECT * FROM fact_table ORDER BY sales_date;

Queries that search only a small number of rows of data should be processed bythe database server to avoid the overhead of sending the query to the acceleratorserver.

Queries that are not considered for acceleration

There are some queries that will not be processed by the accelerator server.

Queries that would change the data cannot be processed by the accelerator serverand must be processed by the database server. The data in the accelerator server isa snapshot view of the data and is read only. There is no mechanism to change thedata in the data marts and replicate those changes back to the source databaseserver.

Other queries that are not processed by the accelerator server include queries thatcontain INSERT, UPDATE, or DELETE statements, queries that contain subqueries,and other OLTP queries.Related concepts:“Queries that benefit from acceleration” on page 1-9

Supported data typesInformix Warehouse Accelerator supports specific data types.

The following data types are supported:v BIGINTv BIGSERIALv CHARv CHARACTERv CHARACTER VARYING

1-12 IBM Informix Warehouse Accelerator Administration Guide

Page 27: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v DATEv DATETIME HOUR TO SECONDv DATETIME YEAR TO DAYv DATETIME YEAR TO FRACTION(3)v DECIMAL(p,s)v DOUBLE PRECISIONv FLOATv INTv INT8v INTEGERv LVARCHARv MONEYv NUMERIC(p,s)v REALv SERIALv SERIAL8v SMALLFLOATv SMALLINTv VARCHARRelated concepts:

Data types (Guide to SQL: Reference)

Supported functions and expressionsInformix Warehouse Accelerator supports specific functions and expressions.

Aggregate functions and expressions

The following aggregate functions are supported by Informix WarehouseAccelerator:v AVGv COUNTv STDEVv SUMv VARIANCE

Aggregate functions with the DISTINCT keyword are supported. For example,COUNT DISTINCT(). The DISTINCT keyword is also supported in an SQLprojection clause like SELECT DISTINCT stock_num, manu_code FROM items;.However, you cannot use the DISTINCT keyword in an aggregate function and inan SQL projection clause in the same query.

User-defined functions

User-defined functions are not supported.

Scalar functions

The following scalar functions are supported by Informix Warehouse Accelerator:v ABS

Chapter 1. Overview of Informix Warehouse Accelerator 1-13

Page 28: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v ADD_MONTHSv CASEv CEILv CONCATv DATEv DAYv DECODEv FLOORv LAST_DAYv LENv LENGTHv LOWERv LPADv LTRIMv MAXv MINv MODv MONTHv MONTHS_BETWEENv NEXT_DAYv NVLv POWv POWERv RANGEv ROUNDv RPADv RTRIMv SUBSTRv SUBSTRINGv TODAYv TRIMv TRUNCv UNITS DAYv UNITS FRACTIONv UNITS HOURv UNITS MINUTEv UNITS SECONDv UPPERv WEEKDAYv YEAR

Restriction:

v The CONCAT function and its equivalent concatenation operator (||) have thefollowing restriction in Informix Warehouse Accelerator: Depending on the datatypes of its operands, the formatting of its result might differ from theformatting returned by the Informix database server. Affected data types include

1-14 IBM Informix Warehouse Accelerator Administration Guide

Page 29: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

the DATE and TIME data types (DATE, DATETIME HOUR TO SECOND,DATETIME YEAR TO FRACTION) and the floating point types (DOUBLEPRECISION, FLOAT, SMALLFLOAT, REAL).

v The SUBSTR and the SUBSTRING functions have the following restrictions inInformix Warehouse Accelerator:– The start_position value must be greater than 0.– The length value must be greater than or equal to 0.– The sum of the start_position value and the length value must be less than or

equal to the length of the source_string.

If the parameter values are outside of these boundaries, the accelerated querywill cause an error message.

Related reference:

Expression (Guide to SQL: Syntax)

Supported and unsupported joinsSpecific join types, join predicates, and join combinations are supported byInformix Warehouse Accelerator.

Supported joins

Equality join predicates, INNER joins, and LEFT OUTER joins are the supportedjoin types.

The fact table referenced in the query must be on the left side of the LEFT OUTERjoin.

Any filter on a dimension table that you use in a LEFT OUTER join must be apost-join filter. A post-join filter is in the WHERE clause after the join.

Unsupported joins

The following joins are not supported:v RIGHT OUTER joinsv FULL OUTER joinsv Informix outer joinsv Joins that do not use an equality predicatev Subqueries

Chapter 1. Overview of Informix Warehouse Accelerator 1-15

Page 30: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

1-16 IBM Informix Warehouse Accelerator Administration Guide

Page 31: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 2. Installation

You can install Informix Warehouse Accelerator on the same computer as theInformix database server, on a separate computer, or on a cluster (including ahigh-availability cluster).

Important: Only one instance of Informix Warehouse Accelerator can be installedon a computer.

Informix Warehouse Accelerator includes an administration client called IBM SmartAnalytics Optimizer Studio. IBM Smart Analytics Optimizer Studio is anEclipse-based program. IBM Smart Analytics Optimizer Studio is included withInformix Warehouse Accelerator.

Before you install the Informix Warehouse Accelerator, ensure that your computersmeet the software and hardware prerequisites, and that you have decided whicharchitecture you want to implement.

Informix Warehouse Accelerator prerequisites and requirementsEnsure that your system meets the prerequisites and the requirements for InformixWarehouse Accelerator. You must have certain utilities installed. Clusterinstallations have additional requirements.

General prerequisites

Following are the general prerequisites for Informix Warehouse Accelerator:v You must have an Informix warehouse edition installed before you can install

Informix Warehouse Accelerator.v Only one instance of Informix Warehouse Accelerator can be installed on a

computer.

System requirements

Informix Warehouse Accelerator must be installed on a computer that uses a LinuxIntel x86 64-bit operating system. For the detailed list of supported operatingsystems and hardware, see the Informix Warehouse Accelerator systemrequirements: http://www.ibm.com/support/docview.wss?rs=630&uid=swg27021332.

Informix Warehouse Accelerator supports query acceleration on an Informixdatabase server that uses one of the following operating systems:v AIX® 64-bitv HP IA 64-bitv Linux Intel x86 64-bitv Solaris SPARC 64-bitv Solaris x64 64-bit

© Copyright IBM Corp. 2010, 2012 2-1

Page 32: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Required utilities

You must have the following utilities on the server where Informix WarehouseAccelerator is installed:v Telnet client programv Expect utility (expect-5)v su command

Requirements for Informix Warehouse Accelerator installed on acluster system

Following are additional requirements for installing Informix WarehouseAccelerator on a cluster system:v You must have a shared-disk cluster file system. For example, IBM General

Parallel File System (GPFS™).v The user root must be able to connect to all cluster nodes by using the Secure

Shell (SSH) network protocol without a password.v If user informix is used for Informix Warehouse Accelerator administration, user

informix must be able to connect to all cluster nodes by using the Secure Shell(SSH) network protocol without a password.

v The file paths for the Informix Warehouse Accelerator installation files must bethe same on each cluster node.

Related concepts:“Configuring memory for Informix Warehouse Accelerator” on page 3-8

Informix Warehouse Accelerator directory structureWhen you install and set up Informix Warehouse Accelerator, there are severaldirectories that are needed.

Installation directory

Informix Warehouse Accelerator is installed in the directory that is specified by theINFORMIXDIR environment variable, if the variable is set in the environment inwhich the installer is launched. If the variable is not set, the default installationdirectory is /opt/IBM/informix. Whenever there is a reference to the file path forthe accelerator server installation directory, the file path appears as $IWA_INSTALL_DIR.

Storage directory

The Informix Warehouse Accelerator software resides in its own directory, referredto as the accelerator server storage directory. This directory stores the InformixWarehouse Accelerator catalog, data marts, logs, traces, and so forth. You createthis directory when you configure the accelerator server. The file path for thisdirectory is stored in the DWADIR parameter in the dwainst.conf file.

IBM Smart Analytics Optimizer Studio directory

You specify the path to this directory when you install Smart Analytics OptimizerStudio.

2-2 IBM Informix Warehouse Accelerator Administration Guide

Page 33: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Sample directory for Java classes

The Java classes that are included with the command line sample are located in thedwa/example/cli directory.

Tip: Information about the Java classes is located in the dwa_java_reference.txtfile in the dwa/example/cli directory.

Documentation directory

Before you install Informix Warehouse Accelerator, you can access thedocumentation in the following directories:v The release notes file is in the $IWA_ROOT_DIR/doc directoryv The Quick Start Guide is in the $IWA_ROOT_DIR/quickstart directory

After you install Informix Warehouse Accelerator, you can access thedocumentation in the following directories:v The release notes file is in the $IWA_INSTALL_DIR/release/en_us/0333/doc

directoryRelated tasks:“Configuring Informix Warehouse Accelerator” on page 3-1Related reference:“dwainst.conf configuration file” on page 3-5

Preparing the Informix database serverBefore you install Informix Warehouse Accelerator, you need to configure thedatabase server.

To configure the Informix database server:1. Ensure that the user informix has write access to the sqlhosts file and the

directory that the file is in.2. Define a SOCTCP network connection type in the sqlhosts file for the

connection between the accelerator server and the database server.3. If you do not already have a default sbspace created and configured, create the

default sbspace:a. In the ONCONFIG file, set the SBSPACENAME parameter to the name of your

default sbspace. For example, to name the default sbspace sbsp1:SBSPACENAME sbspace1 # Default sbspace name

You must update the ONCONFIG file before you start the database server.b. Use the onspaces command to create the sbspace.

The following example creates an sbspace named sbspace1:onspaces -c -S sbspace1 -p $INFORMIXDIR/tmp/sbspace1 -o 0 -s 30000

Note: The size of the sbspace can be relatively small, for example between30 and 50 MB.

c. Restart the Informix database server.

Chapter 2. Installation 2-3

Page 34: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:“Missing sbspace” on page 9-1

The sqlhosts information (Administrator's Guide)Related reference:

sqlhosts Connectivity information (Administrator's Guide)

Installing Informix Warehouse AcceleratorYou can use the graphical mode, console mode, or silent mode to install InformixWarehouse Accelerator.

Before you begin, see the “Informix Warehouse Accelerator prerequisites andrequirements” on page 2-1.

You can install Informix Warehouse Accelerator on the same computer as yourInformix database server, on a separate computer, or on a cluster system.

Informix Warehouse Accelerator is included in any warehouse edition of theInformix database server. You can install Informix Warehouse Accelerator from theprovided installation media, or you can install it after you download a warehouseedition of Informix from Passport Advantage®.1. On the computer where you want to run the Informix Warehouse Accelerator

installation program, log in as user root.2. From the product media or the download site, locate the IBM Informix

warehouse edition bundle and unpack the iif.version.tar file.3. Select the installation mode that you want to use:

v For the graphical or console mode:a. Issue the install command to start the installation program:

Installation mode Installation command

Graphical ./iwa_install -i gui

Console ./iwa_install -i console

b. Read the license agreement and accept the terms.c. Respond to the prompts in the installation program as the program

guides you through the installation.v For the silent mode:

a. Make a copy of the response file template that is located in the samedirectory as the Informix Warehouse Accelerator installation program. Thename of the template is iwa.properties.

b. In the response file change the value for license from FALSE to TRUE, toindicate that you accept the license terms. For example:DLICENSE_ACCEPTED=TRUE

c. Issue the installation command for the silent mode. The command for thesilent mode installation is:./iwa_install -i silent -f "file_path"

Tip: Specify the absolute path for the response file.For example, to use the silent mode with a response file calledinstaller.properties that is located in the /usr3/iwa/ directory, thecommand is:

2-4 IBM Informix Warehouse Accelerator Administration Guide

Page 35: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

./iwa_install -i silent -f "/usr3/iwa/installer.properties"

After you complete the installation, there are additional steps if you want to installIBM Smart Analytics Optimizer Studio.v Informix Warehouse Accelerator is installed in the directory that is specified by

the INFORMIXDIR environment variable, if the INFORMIXDIR environmentvariable is set in the environment in which the installer is launched. Otherwise,the default installation directory is /opt/IBM/informix.

v The configuration file, $IWA_INSTALL_DIR/dwa/etc/dwainst.conf, is generatedduring the installation. This configuration file is required to start InformixWarehouse Accelerator.

v The installation log file, $IWA_INSTALL_DIR/IBM_Informix_Warehouse_Accelerator_InstallLog.log, is generated during theinstallation. This log file provides information on the actions performed duringinstallation and success or failure status of those actions.

You must configure and start Informix Warehouse Accelerator before you can useit.Related concepts:Chapter 3, “Configuration,” on page 3-1“Configuring memory for Informix Warehouse Accelerator” on page 3-8Related tasks:“Installing IBM Smart Analytics Optimizer Studio”“Uninstalling Informix Warehouse Accelerator” on page 2-6

Installing IBM Smart Analytics Optimizer StudioYou can install IBM Smart Analytics Optimizer Studio on a computer that meetscertain prerequisites.

Prerequisites

v Supported operating systems are 32-bit Linux, 32-bit Windows, or 64-bitWindows.

v You must have write permission on the directory where you plan to installSmart Analytics Optimizer Studio.

To install Smart Analytics Optimizer Studio:1. Locate the Smart Analytics Optimizer Studio installation program. On the

computer where you unpacked the IBM Informix warehouse edition .tar file,the installation programs are in the IBM_Smart_Analytics_Optimizer_Suitedirectory. There is one installation program for Linux and another installationprogram for Windows computers. The names of the installation programs are:IBM_Smart_Analytics_Optimizer_Suite/install.binIBM_Smart_Analytics_Optimizer_Suite/install.exe

2. Insert the provided media or use FTP to copy the installation program to aseparate computer.

3. Run the installation program to install Smart Analytics Optimizer Studio. SmartAnalytics Optimizer Studio is installed in the path that you specify.Linux only:v You can use the -i swing option for graphical installation.

Chapter 2. Installation 2-5

Page 36: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v You can use the -i silent option for a silent installation. Include the licenseagreement and installation directory property settings. For example:./install.bin -i silent -DLICENSE_ACCEPTED=TRUE -DUSER_INSTALL_DIR=/home/test/ds.

v Console mode installation is not supported.4. Ensure that Smart Analytics Optimizer Studio opens without any errors.

After you complete the installation, open the directory where Smart AnalyticsOptimizer Studio is installed and run the ./datastudio command to start SmartAnalytics Optimizer Studio.Related concepts:Chapter 3, “Configuration,” on page 3-1Related tasks:“Installing Informix Warehouse Accelerator” on page 2-4

Uninstalling Informix Warehouse AcceleratorIf you need to reinstall the Informix Warehouse Accelerator or if you no longerwant to use Informix Warehouse Accelerator, you must uninstall it.

You must be logged on as user root to run the uninstaller.

To uninstall Informix Warehouse Accelerator:1. Stop the accelerator server by using the ondwa stop command.2. Optional: To completely uninstall the Informix Warehouse Accelerator files, for

example in cases where you do not plan to reinstall or upgrade the product,remove the files in the shared and local directories in the accelerator serverstorage directory and the log files for the accelerator server node that werecreated by the ondwa setup command:a. Drop all data marts from all accelerators of the accelerator server.b. Remove all accelerators of the accelerator server.c. Run the ondwa clean command.

3. Run the uninstaller program, uninstall_iwa, which is located in the$INFORMIXDIR/uninstall/uninstall_iwa directory.

Related concepts:“Dropping a data mart” on page 5-29Related tasks:“Installing Informix Warehouse Accelerator” on page 2-4Related reference:“ondwa stop command” on page 3-16“ondwa clean command” on page 3-17

Updating Informix Warehouse AcceleratorWhen you install an Informix fix pack, you must update the Informix WarehouseAccelerator software to match the Informix version.

Prerequisite: Make sure that all the data mart definitions are up to date in theaccelerator server.

2-6 IBM Informix Warehouse Accelerator Administration Guide

Page 37: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

You can only update the Informix Warehouse Accelerator software to a version thatcorresponds to the Informix database server. For example, if you are updating theInformix server from version 11.70.FC4 to 11.70.FC5, then you must update theInformix Warehouse Accelerator software to version 11.70.xC5.1. Drop all the data marts in the accelerator server. Make sure that you connect to

the correct database when you drop the individual data marts.2. Stop the accelerator server by using the “ondwa stop command” on page 3-16.3. Run the “ondwa clean command” on page 3-17.4. Install the Informix Warehouse Accelerator update:

a. Rename the installation directory to a different name. You will use theconfiguration files in the original installation directory to configure the newinstallation. By default Informix Warehouse Accelerator is installed in thedirectory that is specified by the INFORMIXDIR environment variable, ifthe INFORMIXDIR environment variable was set. Otherwise, the defaultinstallation directory is /opt/IBM/informix.

b. Use the installer to install the new version. The installer will install the newversion in the original installation directory.

5. Configure Informix Warehouse Accelerator. The configuration file isdwainst.conf. Cluster configurations use an additional file, cluster.conf. Bothfiles are located in the $IWA_INSTALL_DIR/dwa/etc directory.v To use the previous configuration, copy the configuration file or files from

the original renamed installation directory to the new installation directory.v To take advantage of new capabilities in the updated version, merge the

previous configuration file or files with the new default configuration files asneeded.

6. Run the “ondwa setup command” on page 3-12.7. Run the “ondwa start command” on page 3-13.8. Re-create and load the data marts.9. Optional: After you have tested the updated Informix Warehouse Accelerator

installation, remove the original renamed installation directory.Related concepts:“Dropping a data mart” on page 5-29“Create a data mart” on page 5-5Related tasks:“Configuring Informix Warehouse Accelerator” on page 3-1“Configuring Informix Warehouse Accelerator for hardware clusters” on page 3-2

Chapter 2. Installation 2-7

Page 38: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

2-8 IBM Informix Warehouse Accelerator Administration Guide

Page 39: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 3. Configuration

You must configure the accelerator server to work with an Informix databaseserver.

After you install Informix Warehouse Accelerator, there are several configurationsteps that you must complete before it can accelerate queries.Related tasks:“Installing Informix Warehouse Accelerator” on page 2-4“Installing IBM Smart Analytics Optimizer Studio” on page 2-5

Configuring Informix Warehouse AcceleratorYou must configure the Informix Warehouse Accelerator before you can enablequery acceleration and set up the connection between the accelerator server andthe database server.

Configure the accelerator server by identifying the network interface, creating astorage directory, and editing the dwainst.conf configuration file:1. On the computer where the accelerator server is installed, log on as user root.2. Determine the correct network interface value to use for the connection from

the Informix database server to the accelerator server:a. Run the Linux ifconfig system command to retrieve the information about

the network devices on your system.b. Review the output with your system administrator and network

administrator and select the appropriate value to use. Examples of networkinterface values are: eth0, lo, peth0. The default value is lo.

Important: If the accelerator server is installed on a separate computer thanthe Informix database server, you cannot use the local loopback value.

3. Create a directory to use as the accelerator server storage directory. Create thisdirectory with enough space to store the accelerator server catalog, data marts,logs, traces, and so on. Because the amount of data in the accelerator serverstorage directory might increase significantly, do not create the acceleratorserver storage directory in the accelerator server installation directory. You willspecify the file path for this directory in the value for the DWADIR parameterin the dwainst.conf file.

4. Open the $IWA_INSTALL_DIR/dwa/etc/dwainst.conf configuration file. Reviewand edit the values in the “dwainst.conf configuration file” on page 3-5.

Important: Specify the network interface value for the DRDA_INTERFACEparameter in the dwainst.conf file.

5. Run the “ondwa setup command” on page 3-12 to create the files andsubdirectories that are required to run the accelerator server.

6. Run the “ondwa start command” on page 3-13 to start all of the acceleratorserver nodes.

© Copyright IBM Corp. 2010, 2012 3-1

Page 40: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:“Informix Warehouse Accelerator directory structure” on page 2-2Related reference:“The ondwa utility” on page 3-11“ondwa setup command” on page 3-12“ondwa start command” on page 3-13“dwainst.conf configuration file” on page 3-5

Configuring Informix Warehouse Accelerator for hardware clustersYou must configure Informix Warehouse Accelerator before you can enable queryacceleration and set up the connection between the accelerator server and thedatabase server. In a cluster system, one accelerator server coordinator node usesthe first cluster node, and then each cluster node that you add to the clusterbecomes an accelerator server worker node.

Prerequisite: Test that user root or user informix can run the Secure Shell (SSH)network protocol without a password between all cluster nodes.

Configure the accelerator server by identifying the network interface, creating astorage directory, editing the parameters in the dwainst.conf configuration file,and creating a cluster.conf file.1. On one of the cluster nodes where the accelerator server is installed, log on as

user root.2. Determine the correct network interface value to use for the connection from

the Informix database server to the accelerator server:a. Run the Linux ifconfig system command to retrieve the information about

the network devices on your system.b. Review the output with your system administrator and network

administrator and select the appropriate value to use. Examples of networkinterface values are eth0 or peth0.

3. On the shared cluster file system, create a directory to use as the acceleratorserver storage directory. The storage directory must be accessible with the samepath on all cluster nodes. Create this directory with enough space to store theaccelerator server catalog, data marts, logs, traces, and so on. For example:$ mkdir $IWA_INSTALL_DIR/dwa/demo

Because the amount of data in the accelerator server storage directory mightincrease significantly, do not create the accelerator server storage directory inthe accelerator server installation directory.

4. Open the $IWA_INSTALL_DIR/dwa/etc/dwainst.conf configuration file. Reviewand edit the values in the “dwainst.conf configuration file” on page 3-5:a. For the DRDA_INTERFACE parameter, specify the network interface value

that you identified in step 2.b. For the DWADIR parameter, specify the file path for the storage directory

that you created in step 3. On all cluster nodes, the DWADIR parametermust be the same file path.

c. For the CLUSTER_INTERFACE parameter, specify the network device namefor the connection between the cluster nodes. For example, eth0.

d. If only one coordinator node or one worker node will run on each clusternode, add the following additional parameters and values:

3-2 IBM Informix Warehouse Accelerator Administration Guide

Page 41: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

CORES_FOR_SCAN_THREADS_PERCENTAGE=100CORES_FOR_LOAD_THREADS_PERCENTAGE=100CORES_FOR_REORG_THREADS_PERCENTAGE=25

5. In the $IWA_INSTALL_DIR/dwa/etc directory, create a file named cluster.conf tostore the host names or IP addresses of the cluster nodes. In the cluster.conffile, enter one cluster node per line. For example:node0001node0002node0003node0004

The order that you list the hosts names (or their IP addresses) of the clusternodes is the order that the cluster nodes are started or stopped with the ondwastart and ondwa stop commands.

6. Use the ondwa commands to set up and start the accelerator server. You canrun the ondwa commands from any node in the cluster. The ondwa commandsapply to all the nodes listed in the cluster.conf file.a. Run the “ondwa setup command” on page 3-12 to create the files and

subdirectories that are required to run the accelerator server. Exampleoutput:Checking for DWA_CM_node0 on node0001: stoppedChecking for DWA_CM_node1 on node0002: stoppedChecking for DWA_CM_node2 on node0003: stoppedChecking for DWA_CM_node3 on node0004: stopped

b. Run the “ondwa start command” on page 3-13 to start all of the clusternodes. Example output:Starting DWA_CM_node0 on node0001: startedStarting DWA_CM_node1 on node0002: startedStarting DWA_CM_node2 on node0003: startedStarting DWA_CM_node3 on node0004: started

Related reference:“dwainst.conf configuration file” on page 3-5

Configuring Informix Warehouse Accelerator on secondary servers ina high-availability environment

You can create data marts, load data mart data, and accelerate queries on one ormore secondary servers in a high-availability cluster. By using secondary serversfor Informix Warehouse Accelerator, you have greater flexibility in amixed-workload environment. For example, you can dedicate the primary serverfor OLTP transactions and use a secondary server for processing the warehouseanalytic queries. Configure the secondary servers by modifying the ONCONFIGfile of each secondary server, connecting one of the secondary servers to anaccelerator, and copying the sqlhosts entry in the sqlhosts file to each server in thecluster.

Prerequisites

v Configure the high-availability cluster for the Informix database server.v Install IBM Smart Analytics Optimizer Studio.

High-availability secondary servers include shared-disk (SD) secondary servers,high-availability data replication (HDR) secondary servers, and remote stand-alone(RS) secondary servers.

Chapter 3. Configuration 3-3

Page 42: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

To configure the servers in a high-availability cluster to use Informix WarehouseAccelerator, follow these steps. You can choose to configure Informix WarehouseAccelerator on a subset of the secondary servers in the cluster.1. Set the UPDATABLE_SECONDARY configuration parameter in the

ONCONFIG file on each secondary server that you plan to use for InformixWarehouse Accelerator. This configuration parameter sets the number ofconnections to establish to the primary server. For the Informix WarehouseAccelerator connection, you can set this value to 1. (Depending on the numberand workload of your client applications, you might need to set thisconfiguration parameter to a higher value.)

2. Update the VPCLASS configuration parameter in the ONCONFIG file on eachsecondary server that you plan to use for Informix Warehouse Accelerator. Addthe dwavp virtual processor and set its value to 1. For example: VPCLASSdwavp,num=1. This virtual processor runs the administrative functions andprocedures for Informix Warehouse Accelerator.

3. Make sure that each secondary server has access to the required sbspace asdescribed in “Preparing the Informix database server” on page 2-3.

4. Restart each secondary server for which you modified the ONCONFIG file forthe changes to take effect.

5. Connect one of the servers in the cluster to an accelerator. Follow steps 1 - 6 inChapter 4, “Creating an accelerator,” on page 4-1. When the accelerator isconnected to the Informix database server, the sqlhosts file on the Informixdatabase server is updated. You will use the new sqlhosts entry in the sqlhostsfile in the next step.

6. Copy the sqlhosts entry that you created in the previous step to the sqlhostsfile in each server in the cluster that you plan to use for Informix WarehouseAccelerator.

Important: Do not change any of the text in the sqlhosts entry. The sqlhostsentry is stored in the server system catalog and the sqlhosts entry must beidentical on all the servers so that they can communicate with InformixWarehouse Accelerator.

After you configure the servers in a high-availability cluster for InformixWarehouse Accelerator, when you deploy a data mart from the primary server orany of the secondary servers, the data mart definitions are replicated to all theservers in the cluster. Any changes to the state of a data mart that occur on one ofthe servers are replicated to all the servers in the cluster.

Important: If the primary server fails while you are performing a data martoperation (for example, creating or loading a data mart), the data mart operationmight fail. After a secondary server successfully becomes a new primary server, tryany failed data mart operations again. If the primary failover caused the deployingor the loading of the data mart to fail, you must drop the data mart, create it, andload it again.

3-4 IBM Informix Warehouse Accelerator Administration Guide

Page 43: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:

High-availability cluster configuration (Administrator's Guide)Related tasks:“Installing IBM Smart Analytics Optimizer Studio” on page 2-5Related reference:

UPDATABLE_SECONDARY configuration parameter (Administrator'sReference)

Add virtual processors in online mode with onmode (Administrator's Guide)

VPCLASS configuration parameter (Administrator's Reference)

dwainst.conf configuration fileThe dwainst.conf configuration file contains the parameters that are used toconfigure the accelerator server.

The dwainst.conf configuration file is added to the $IWA_INSTALL_DIR/dwa/etcdirectory when you install Informix Warehouse Accelerator.

Open the dwainst.conf configuration file and edit the parameter values before yourun the ondwa setup command.

Important: After initial setup, if you update any of the parameters in thedwainst.conf configuration file, you must run the following ondwa commandsagain for the updated parameters to take effect:v ondwa stop

v ondwa setup

v ondwa start

The dwainst.conf file contains the following parameters.

Table 3-1. Parameters in the dwainst.conf file

Parameter Description Guidance

CLUSTER_INTERFACE For cluster installations: Thenetwork device name for theconnection between thecluster nodes.

Common examples are eth0,eth1, or eth2.

COORDINATOR_SHM The value, in megabytes, ofthe shared memory on thecoordinator node.

The total of the sharedmemory on the coordinatornode and worker nodesshould not exceed the freememory on the computerwhere the accelerator serveris installed.Tip: The coordinator nodedoes not need as muchshared memory as theworker nodes. A valuebetween 5 to 10 % of thetotal memory set aside forthe accelerator server is agood estimate for thisparameter.

Chapter 3. Configuration 3-5

Page 44: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 3-1. Parameters in the dwainst.conf file (continued)

Parameter Description Guidance

CORES_FOR_LOAD_THREADS_PERCENTAGE

Used in cluster installations. If only one coordinator nodeor one worker node will runon each cluster node, set thisvalue to 100.

CORES_FOR_REORG_THREADS_PERCENTAGE

Used in cluster installations. If only one coordinator nodeor one worker node will runon each cluster node, set thisvalue to 25.

CORES_FOR_SCAN_THREADS_PERCENTAGE

Used in cluster installations. If only one coordinator nodeor one worker node will runon each cluster node, set thisvalue to 100.

DRDA_INTERFACE The network device namethat you will use for theconnection from the Informixdatabase server to theaccelerator server.

The default value is lo.

Ask your systemadministrator and networkadministrator which networkinterface to use for theDRDA_INTERFACE value.

If the accelerator server isinstalled on a separatecomputer than the Informixdatabase server, you cannotuse the local loopback value.

DWADIR The name and file path foraccelerator server storagedirectory.

Create the directory first andthen specify the directory inthe dwainst.conf file.Note: Specify the directorybefore you run the ondwasetup command.

NUM_NODES The number of nodes(DWA_CM processes)

The number of acceleratorserver nodes should notoverload the computer wherethe accelerator server isinstalled.

The number of worker nodesis the value of theNUM_NODES parameter - 1.

3-6 IBM Informix Warehouse Accelerator Administration Guide

Page 45: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 3-1. Parameters in the dwainst.conf file (continued)

Parameter Description Guidance

START_PORT The starting port number forthe coordinator node and theworker nodes.

The accelerator serverassigns the port numbersthat immediately follow thestarting port number to thecoordinator node and theworker nodes. These portnumbers should not alreadybe used by other processes.

Each accelerator server nodeneeds to be configured withfour different port numbers.Beginning with the startingport number, the nodes areassigned incremental portnumbers. For example, ifyour accelerator server hasfive nodes and you specifythe START_PORT number as21020, the accelerator serverwill use ports 21020 – 21039because each node uses fourport numbers.

WORKER_SHM The value, in megabytes, ofthe total shared memory,combined, on all the workernodes.

The combined total sharedmemory on the workernodes and the coordinatornode should not exceed thefree memory on thecomputer where theaccelerator server is installed.Tip: The data marts, with alltheir data in the compressedformat, must fit into theshared memory on theworker nodes. Plan on usingapproximately two-thirds ofthe total memory for theaccelerator server as workernodes shared memory.

The following example shows parameters and their values in a dwainst.confconfiguration file:DWADIR=$IWA_INSTALL_DIR/dwa/demoSTART_PORT=21020NUM_NODES=2WORKER_SHM=500COORDINATOR_SHM=250DRDA_INTERFACE="eth0"

Chapter 3. Configuration 3-7

Page 46: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:“Informix Warehouse Accelerator directory structure” on page 2-2“Configuring memory for Informix Warehouse Accelerator”Related tasks:“Configuring Informix Warehouse Accelerator” on page 3-1“Configuring Informix Warehouse Accelerator for hardware clusters” on page 3-2Related reference:“ondwa setup command” on page 3-12

Configuring memory for Informix Warehouse AcceleratorTo process queries efficiently, verify that you have the optimal configuration for theoperating-system kernel parameters, shared memory, and swap space on thecomputer where Informix Warehouse Accelerator is installed. You can also monitorthe virtual memory usage to see if you need to reduce the total size of the loadeddata marts or add physical memory.

“vm.overcommit_memory and the vm.overcommit_ratio kernel parameters”“SHMMAX kernel parameter”“Shared memory for the worker nodes and the coordinator node (/dev/shm)”on page 3-9“Swap space configuration” on page 3-10“Virtual memory usage” on page 3-10

vm.overcommit_memory and the vm.overcommit_ratio kernelparameters

To avoid issues that might arise if the Linux kernel runs out of memory, set thevm.overcommit_memory parameter and the vm.overcommit_ratio parameter tovalues that are optimal for Informix Warehouse Accelerator.1. Add the following lines to the /etc/sysctl.conf file:

vm.overcommit_memory = 2vm.overcommit_ratio = 99

2. Run the sysctl -p command for the settings to take effect.

For more information, see your operating-system documentation.

SHMMAX kernel parameter

The SHMMAX kernel parameter defines the maximum size in bytes of a singleshared memory segment. For Informix Warehouse Accelerator, the optimal value ofthe SHMMAX kernel parameter is the size of physical memory. The minimumvalue is the WORKER_SHM parameter * 1048576 .

Use this command to check the value of the SHMMAX kernel parameter. Theoutput value is printed in bytes.

sysctl kernel.shmmax

To change the value of the SHMMAX kernel parameter:1. Add the following line to /etc/sysctl.conf file where bytes is the number of

bytes:

3-8 IBM Informix Warehouse Accelerator Administration Guide

Page 47: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

kernel.shmmax = bytes

2. Run the sysctl -p command for the setting to take effect.

For more information, see your operating-system documentation.

Shared memory for the worker nodes and the coordinator node(/dev/shm)

The more worker nodes that you designate, the faster the data is loaded from thedatabase server. However, the more worker nodes you designate, the morememory you need because each worker node stores a copy of the data in thedimension tables. If you do not have sufficient memory assigned to the coordinatornode and to the worker nodes, you might receive errors when you load data fromthe database server or when you run queries.

Informix Warehouse Accelerator uses the shared memory (/dev/shm) for the sharedmemory of the coordinator node and the worker nodes.

The default size of /dev/shm is half of the total memory. If you change the size of/dev/shm, it must be smaller than the total memory in order to leave enoughmemory for other tasks.

For Informix Warehouse Accelerator installed on a single computer, the sum ofvalues for the WORKER_SHM parameter and the COORDINATOR_SHMparameter must fit in available space of /dev/shm.

For Informix Warehouse Accelerator installed on a hardware cluster, the value ofthe WORKER_SHM parameter/ (NUM_NODES parameter - 1) must fit inavailable space of /dev/shm on each worker node. The value of theCOORDINATOR_SHM parameter must fit in available space of/dev/shm on thecoordinator node.

You specify the values for the WORKER_SHM parameter and theCOORDINATOR_SHM parameter in the dwainst.conf configuration file.

To check the size of the available space in /dev/shm, run this command:

df -h /dev/shm

Example output:Filesystem Size Used Avail Use% Mounted ontmpfs 1.0G 0 1.0G 0% /dev/shm

To change the size of /dev/shm, use the tmpfs mount option "size=nbytes". Use thesuffix k for kilobytes, m for megabytes, or g for gigabytes.

Example line in the file-system table file/etc/fstab with the size of /dev/shm to 1gigabyte:tmpfs /dev/shm tmpfs defaults,size=1g 0 0

The new size is effective when you remount /dev/shm or when you restart thecomputer. For example:mount -o remount /dev/shm

Chapter 3. Configuration 3-9

Page 48: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Swap space configuration

Even on systems that have a large amount of total memory, configuring the swapspace can be an advantage. Swap space can prevent unexpected situations wherethe system might need more memory than is available.

Check the total and the used swap space with this command:

free -m

Example output (in megabytes):total used free shared buffers cached

Mem: 2010 664 1345 0 124 357-/+ buffers/cache: 182 1827Swap: 3138 0 3138

Configure the swap space as recommended by your Linux vendor. For example,for Red Hat Enterprise Linux (RHEL) 5:Total memory Total swap space4GB or less min 2GB4GB to 16GB min 4GB16GB to 64GB min 8GB64GB to 256GB min 16GB256GB to 512GB min 32GB

For more information, see your operating-system documentation.

Virtual memory usage

Some types of SQL queries might need a lot of memory. For optimal performance,avoid swapping out memory pages to disk. First check if memory pages arecurrently swapped out to disk. If memory pages are swapped out to disk, reducethe total size of the loaded data marts or add physical memory.

Check if the memory pages are swapped out to disk with this command:

vmstat -S m 3

Example output in megabytes, and 3-seconds intervals:procs -----------memory-------- ---swap-- -----io---- --system-- -----cpu-----r b swpd free buff cache si so bi bo in cs us sy id wa st0 0 54 1843 3 200 0 0 17 20 14 9 2 0 97 0 01 0 54 1673 3 201 0 0 263 0 1028 193 11 3 85 2 00 0 54 1803 3 201 0 0 0 36 1019 222 35 9 56 0 0

If values in so column are greater than zero, then pages are swapped out in theinterval.

An alternative method for automated monitoring is this command:

vmstat -s -S m

Example output (in megabytes, swap-related lines only):

3-10 IBM Informix Warehouse Accelerator Administration Guide

Page 49: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

201 m swap cache3291 m total swap

54 m used swap3237 m free swap

6761440 pages swapped in7111235 pages swapped out

If value of pages swapped out has incremented since the last time that you ran thecommand, then the pages have been swapped out.

For more information, see your operating-system documentation.Related concepts:“Informix Warehouse Accelerator prerequisites and requirements” on page 2-1“Informix Warehouse Accelerator internal architecture” on page 1-7Related reference:“dwainst.conf configuration file” on page 3-5

The ondwa utilityUse the ondwa utility to set up and work with the accelerator server.

Prerequisites

The ondwa utility is a Bash shell script. Because the accelerator server is supportedonly on Linux operating systems, the ability to run Bash shell scripts is built intothe operating system. The following prerequisites must be installed on the machinewhere you installed the accelerator server:v Telnet client programv Expect utilityv su commandv User informix must exist

The ondwa utility directory

The ondwa utility is located in the $IWA_INSTALL_DIR/bin directory.

Running the ondwa utility in a cluster system

If you have installed Informix Warehouse Accelerator on a cluster system, you canrun the ondwa command from any cluster node. The ondwa command will run onall cluster nodes listed in the $IWA_INSTALL_DIR/dwa/etc/cluster.conf file.Related tasks:“Configuring Informix Warehouse Accelerator” on page 3-1

Users who can run the ondwa commandsEither user root or user informix can run the ondwa commands. To run the ondwacommands as user informix requires setup steps. It is recommended that youdetermine which user will run the ondwa commands and to use the same userconsistently. Whether you run the ondwa commands as user root or as userinformix, user informix must be defined on the accelerator server. Otherwise, theondwa commands will fail.

To run ondwa commands as user informix, the following restrictions apply:

Chapter 3. Configuration 3-11

Page 50: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v The directory specified in the DWADIR parameter in the dwainst.conf file mustbe owned by user informix.

v If you have a DWA_watchdog.log file, it must be writable for user informix. TheDWA_watchdog.log file is in the directory specified by the DWADIR parameter.

v The following shell soft and hard limits must be set to unlimited prior torunning ondwa commands. For example, you can use the built-in Linux Bashshell ulimit command to change the resource availability.

Table 3-2. Resources that must be set to unlimited for user informix to run ondwacommands.

Resource Bash sell ulimit command

max locked memory ulimit -l

max memory size ulimit -m

virtual memory ulimit -v

If you installed Informix Warehouse Accelerator on a cluster system with userinformix, you can set the following equivalent parameters to unlimited in the/etc/security/limits.conf file on each cluster node:

memlockmax locked-in-memory address space

rss max resident set size

as address space limit

For example:informix soft memlock unlimitedinformix hard memlock unlimitedinformix soft rss unlimitedinformix hard rss unlimitedinformix soft as unlimitedinformix hard as unlimited

ondwa setup commandThe ondwa setup command creates the files and subdirectories that are required torun an accelerator server.

Edit the dwainst.conf configuration file before you run the ondwa setupcommand. The dwainst.conf configuration file contains information that is used toconfigure Informix Warehouse Accelerator.

To run this command, log on to the computer where the accelerator server isinstalled either as user root or as user informix. For you to run the command asuser informix, specific memory resources must be available. For more information,see “Users who can run the ondwa commands” on page 3-11.

Usage:$ ondwa setup

The ondwa setup command uses a file named dwainst.conf in the$IWA_INSTALL_DIR/dwa/etc directory to configure the accelerator server.

By using the dwainst.conf file, the ondwa setup command creates the followingstructure in the accelerator server storage directory:v The directory shared between the accelerator server nodes (shared)

3-12 IBM Informix Warehouse Accelerator Administration Guide

Page 51: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v The directory that contains the accelerator server node private directories (local)v For each accelerator server node:

– The accelerator server node private directory: local/node– The accelerator server node configuration file: node.conf– A link to the DWA_CM executable file: DWA_CM_node

The ondwa utility automatically determines the role of the coordinator node or aworker node. The first node is the coordinator node, whereas the remaining nodesare worker nodes. The number of worker nodes is determined by the followingcalculation: NUM_NODES - 1.

Tip: If you have the accelerator server installed on the same symmetricmultiprocessing (SMP) system as the Informix database server, edit thedwainst.conf file and change the NUM_NODES to 5. This will generate onecoordinator node and four worker nodes on the accelerator server.

Each accelerator server node needs to be configured with four different portnumbers. These port numbers are listed in the configuration file for the acceleratorserver node. The starting port number is taken from the dwainst.conf file, andthen increased by increments. For example, if your accelerator server has fiveaccelerator server nodes and you specify the START_PORT number as 21020, theaccelerator server will use ports 21020 – 21039 because each accelerator server nodeuses four port numbers.

When an accelerator server node is started, the corresponding link to theaccelerator server binary DWA_CM_node is used. The ondwa setup command createsa symbolic link for each accelerator server node to the DWA_CM binary. The linkmakes it easier to find the processes of your accelerator server in a ps outputbecause the ps command shows the symbolic links and not the DWA_CM binaryitself.Related tasks:“Configuring Informix Warehouse Accelerator” on page 3-1Related reference:“ondwa start command”“dwainst.conf configuration file” on page 3-5

ondwa start commandThe ondwa start command starts all of the accelerator server nodes. If theaccelerator server is installed on a cluster hardware system, and if some of thecluster nodes are stopped, the ondwa start command starts the offline clusternodes.

To run this command, log on to the computer where the accelerator server isinstalled either as user root or as user informix. For you to run the command asuser informix, specific memory resources must be available. For more information,see “Users who can run the ondwa commands” on page 3-11.

Usage:$ ondwa start

Chapter 3. Configuration 3-13

Page 52: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

The output of a accelerator server node is recorded in the log file for the node, forexample: node0.log, node1.log, and so forth. These files are located in theaccelerator server storage directory. After the ondwa start command has finished,your accelerator server is ready to use.

After you run ondwa start, you should run the ondwa status command to checkthat status of the accelerator server.Related tasks:“Configuring Informix Warehouse Accelerator” on page 3-1Related reference:“ondwa setup command” on page 3-12“ondwa status command”

ondwa status commandThe ondwa status command shows information about the status of the acceleratorserver nodes, the cluster status, and the expected node count.

To run this command, log on to the computer where the accelerator server isinstalled either as user root or as user informix. For you to run the command asuser informix, specific memory resources must be available. For more information,see “Users who can run the ondwa commands” on page 3-11.

Usage:$ ondwa statusID | Role | Cat-Status | HB-Status | Hostname | System ID---+-------------+------------+-----------+----------+------------0 | COORDINATOR | ACTIVE | Healthy | leo | 11 | WORKER | ACTIVE | Healthy | leo | 2Cluster is in state : Fully OperationalExpected node count : 1 coordinator and 1 worker nodes

The following example output shows the status shows one accelerator server nodeis shut down:$ ondwa statusID | Role | Cat-Status | HB-Status | Hostname | System ID---+-------------+-------------+-----------+----------+------------0 | COORDINATOR | ACTIVE | Healthy | leo | 11 | WORKER | DEACTIVATED | Shutdown | leo | 2Cluster is in state : RecoveringExpected node count : 1 coordinator and 1 worker nodes

The following example output shows the status of a cluster system:ID | Role | Cat-Status | HB-Status | Hostname | System ID-----+-------------+-------------+--------------+------------------+------------0 | COORDINATOR | ACTIVE | Healthy | node0001 | 11 | WORKER | ACTIVE | Healthy | node0002 | 22 | WORKER | ACTIVE | Healthy | node0003 | 33 | WORKER | ACTIVE | Healthy | node0004 | 4

Cluster is in state : Fully OperationalExpected node count : 1 coordinator and 3 worker nodes

Columns in ondwa status command output

The Cat-Status column shows the status of all nodes in the accelerator servercatalog. The Cat-Status column can have one of the following values:

3-14 IBM Informix Warehouse Accelerator Administration Guide

Page 53: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

ACTIVEThe accelerator server node is active. For a cluster system, ACTIVE indicatesthat the cluster node participates in the cluster.

DEACTIVATEDThe accelerator server node is shut down or the accelerator server is notrunning.

FAILOVERA failed accelerator server node that was set in ERROR state.

The HB-Status (heartbeat status) column can have one of the following values:

InitializingThe accelerator server node is initializing and loading data into memory.

HealthyThe initialization is complete and the accelerator server node is ready forqueries.

QuiescePendThe accelerator server node is waiting to go into a quiesced state.

QuiescedThe accelerator server node is in a quiesced state.

ResumingThe accelerator server node is resuming after a quiesced or a maintenancestate.

MaintenanceThe accelerator server node is in maintenance state.

MaintPendThe accelerator server node is waiting to go into a maintenance state.

MissingThe accelerator server node has a missing heartbeat.

ShutdownThe accelerator server node is shutting down.

Related reference:“ondwa start command” on page 3-13

ondwa getpin commandUse the ondwa getpin command to retrieve the IP address, port number, andpairing code that connect a database server to an accelerator server.

To run this command, log on to the computer where the accelerator server isinstalled either as user root or as user informix. For you to run the command asuser informix, specific memory resources must be available. For more information,see “Users who can run the ondwa commands” on page 3-11.

Usage:$ ondwa getpin

The following example shows the values that are returned in this order: IP address,port number, pairing code.127.0.0.1 21022 1234

Chapter 3. Configuration 3-15

Page 54: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

ondwa tasks commandThe ondwa tasks command shows information about that tasks that are currentlyrunning, memory used, and resources.

To run this command, log on to the computer where the accelerator server isinstalled either as user root or as user informix. For you to run the command asuser informix, specific memory resources must be available. For more information,see “Users who can run the ondwa commands” on page 3-11.

Usage:$ ondwa tasks

TaskManager tracking 2 task(s):------------------+--------------------+---------+---------+--------+------------Task 316822777484 (of type ’QUERY’ with name Query execution @ coordinator - 0:00)------------------+--------------------+---------+---------+--------+------------Location | Status | Progr. | Upd. ms | Memory | Monitor------------------+--------------------+---------+---------+--------+------------Primary Node 0 | OPNQRY | 0 | 10 | 17K | Fine

-> Node 1 | Fact | 0 | 3 | 22M | Fine(Total Memory) | | | | 22M |------------------+--------------------+---------+---------+--------+------------Used Resources | Mart ID: 2 on node 0------------------+--------------------+---------+---------+--------+------------Task 437785070080 (of type ’DAEMON’ with name DRDADaemon - 4:48)------------------+--------------------+---------+---------+--------+------------Location | Status | Progr. | Upd. ms | Memory | Monitor------------------+--------------------+---------+---------+--------+------------Primary Node 0 | Running | 2 | 30 | 0 | Fine(Total Memory) | | | | 0 |------------------+--------------------+---------+---------+--------+------------Used Resources | DRDA device: ’lo’ address: ’127.0.0.1:21022’ on node 0

| Unbound on node 0------------------+--------------------+---------+---------+--------+------------- End of Tasklist -

ondwa stop commandThe ondwa stop command stops the accelerator server.

To run this command, log on to the computer where the accelerator server isinstalled either as user root or as user informix. For you to run the command asuser informix, specific memory resources must be available. For more information,see “Users who can run the ondwa commands” on page 3-11.

Usage:$ ondwa stop

$ ondwa stop -f

The ondwa stop action ends when all of the DWA_CM_* processes on theaccelerator server are completed.

Use the -f option to stop the full set of DWA_CM processes. Use this option if theondwa stop action is not able to shut down one or more of the processes.

3-16 IBM Informix Warehouse Accelerator Administration Guide

Page 55: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

ondwa reset commandThe ondwa reset command removes all of the files from the accelerator serverstorage directory that were created by the accelerator server under the shared andlocal/* subdirectories.

To run this command, log on to the computer where the accelerator server isinstalled either as user root or as user informix. For you to run the command asuser informix, specific memory resources must be available. For more information,see “Users who can run the ondwa commands” on page 3-11.

Important: Before using this command, you must drop all data marts on theaccelerator server.

Usage:$ ondwa reset

The ondwa reset command also removes all of the entries of your acceleratorserver under the /dev/shm directory.

This command does not remove the log files for the accelerator server node andthe files created by the ondwa setup command. After you run the ondwa resetcommand, you can initialize the accelerator server by using the ondwa startcommand.

ondwa clean commandThe ondwa clean command cleans the accelerator server directory.

To run this command, log on to the computer where the accelerator server isinstalled either as user root or as user informix. For you to run the command asuser informix, specific memory resources must be available. For more information,see “Users who can run the ondwa commands” on page 3-11.

Important: Before using this command, all of the data marts must be dropped inthe accelerator and the accelerator server must be removed from the computer.

Usage:$ ondwa clean

The ondwa clean command removes the following files and directories:v All of the files created by the ondwa setup commandv The complete shared and local directory trees in the accelerator server storage

directoryv The log files for the accelerator server node

After you run the ondwa clean command, you can run the ondwa setup commandto set up the accelerator server again.

Chapter 3. Configuration 3-17

Page 56: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

3-18 IBM Informix Warehouse Accelerator Administration Guide

Page 57: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 4. Creating an accelerator

You create an accelerator by connecting the accelerator server to an Informixdatabase server. An accelerator is a logical entity that contains information for aconnection to a database server and for the data marts associated with thatconnection. Set up the connection by using the ondwa getpin command to retrievethe IP address, port number, and pairing code from the accelerator server. You thenuse Smart Analytics Optimizer Studio to create the connection to the databaseserver.1. On the computer where the accelerator server is installed, log on as user root.2. Run the “ondwa getpin command” on page 3-15 to retrieve the IP address, port

number, and pairing code from the accelerator server. This information isneeded to establish the initial connection from the Informix database server tothe accelerator server.

3. On the computer where the IBM Smart Analytics Optimizer Studio is installed,start the administration interface:v On Linux, open the directory where Smart Analytics Optimizer Studio is

installed and run the ./datastudio command.v On Windows, select Start > Programs > IBM Smart Analytics Optimizer

Studio 1.1

4. In the Workspace Launcher window you can use the default workspace, selectan existing workspace, or create a new workspace:v The file path and name of default workspace appears in the Workspace

drop-down box. To accept the default workspace, click OK.v To select an existing workspace, choose a workspace from the drop-down list

and click OK.v To create a new workspace, click Browse. Navigate to the directory location

where you want to create the workspace and click Make New Folder. Typethe name for the workspace and click OK. Then click OK again.

5. The first time a workspace is created, a Welcome screen appears. Close theWelcome screen. The newly created blank workspace appears.

6. Connect Smart Analytics Optimizer Studio to the Informix database server andadd the accelerator:a. In the Data Source Explorer window, open the Database Connections folder.b. Create a new connection to the Informix database server. You must use the

Informix JDBC driver for the connection.

Restriction: The IBM Data Server Driver for JDBC is not supported for theconnection between Smart Analytics Optimizer Studio and the Informixdatabase server.

c. To add a new accelerator to the database, right-click the DatabaseConnection folder. Right-click the Accelerators folder and choose AddAccelerator.

d. Using the information you gathered in Step 2, type the name and pairinginformation for the accelerator.

e. Click OK.

© Copyright IBM Corp. 2010, 2012 4-1

Page 58: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

A connection between the accelerator server and the database server isestablished, and the sqlhosts file on the Informix database server is updatedwith the connection information. An example of an entry in the sqlhosts file is:FLINS2 group - - c=1,

a=4b3f3f457d5f552b613b4c587551362d2776496f226e714d75217e22614742677b424224FLINS2_1 dwsoctcp 127.0.0.1 21022 g=FLINS2

7. Use the SET EXPLAIN statement to see the query plan. If the query isaccelerated, the Remote SQL Request section appears in the query plan. Forexample:QUERY: DWA Executed(OPTIMIZATION TIMESTAMP: 02-20-2011 01:05:57)

------select sum(units) from salesfact

Estimated Cost: 242522Estimated # of Rows Returned: 1Maximum Threads: 0

1) sk@FLINS2:dwa.aqt0f957100-cca1-406b-93cc-cae2117122ae:

Remote SQL Request:{QUERY {FROM dwa.aqt0f957100-cca1-406b-93cc-cae2117122ae}{SELECT {SUM {SYSCAST COL10 AS BIGINT} } } }

QUERY: IDS FYI(OPTIMIZATION TIMESTAMP: 02-20-2011 01:05:57)------select sum(units) from salesfact

Estimated Cost: 242522Estimated # of Rows Returned: 1Maximum Threads: 0

1) informix.salesfact: SEQUENTIAL SCAN

Query statistics:-----------------

Table map :----------------------------Internal name Table name----------------------------

type rows_prod est_rows time est_cost-------------------------------------------------remote 1 0 00:00.00 0

Related concepts:

The query plan (Performance Guide)

4-2 IBM Informix Warehouse Accelerator Administration Guide

Page 59: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 5. Data marts and AQTs

For efficient query processing, the accelerator server must have its own copy of thedata. The data is stored in logical collections of related data, or data marts. A datamart specifies the collection of tables that are loaded into an accelerator and therelationships, or references, between these tables.

To create a data mart, you create a data mart definition, deploy the data martdefinition to an accelerator, and then load data into the data mart.

A data mart definition is an XML file that contains information about the tablesused by your warehouse queries. The information includes the tables and columnswithin the table that are included in the data mart. The information also specifieshow the tables and columns are related to each other. The XML file that containsthe data mart definition does not contain any actual user data. You create a datamart definition by analyzing the workload for you existing warehouse queriesagainst your existing warehouse schema. Alternatively, you can manually create adata mart definition by using the IBM Smart Analytics Optimizer Studio.

When a data mart is created, information about the data mart is sent to theInformix database server in the form of a special view referred to as an acceleratedquery table or AQT. The information in the AQTs is used by the database server todetermine which queries can be processed by Informix Warehouse Accelerator. Thedatabase server attempts to match a query with an AQT.

Accelerated query tablesAccelerated query tables, or AQTs, store information about data marts that thedatabase server uses to determine which queries can be processed by InformixWarehouse Accelerator.

The information about AQTs stored in the catalog tables of the Informix databaseserver is the same information that is stored in the catalog tables for other types ofviews.

There can be many AQTs. If the first AQT is not able to satisfy a query, thedatabase server continues to search for a match until the query has been checkedagainst all of the AQTs. If a match is found, the query is sent to InformixWarehouse Accelerator for processing. If no match is found, the query is processedby the database server.

To be sent to Informix Warehouse Accelerator, the query must meet the followingcriteria:v The query must refer to a subset of the tables in the AQT.v The table references, or joins, specified in the query must be the same as the

references in the data mart definition.v The query must include only one fact table.v The query must have an INNER JOIN or LEFT JOIN with the fact table on the

left dominant side.v The scalar and aggregate functions in the query must be supported by Informix

Warehouse Accelerator.

© Copyright IBM Corp. 2010, 2012 5-1

Page 60: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

A data mart can be in one of several different states, but the associated AQTs areeither active or inactive.

When the administrator drops a data mart from the accelerator, the associatedAQTs are removed automatically from the database server.

You can use the onstat -g aqt command to view information about the data martsand the associated AQTs.

Data martsTypically, data marts contain a subset of the tables in your database. The datamarts can also contain a subset of the columns within a table.

To improve query processing, limit the number of dimension tables, and columnswithin the dimension tables, in the data mart. By identifying only those columnsthat are necessary to respond to your queries.

However, the data marts do not need to be a duplication of the design of yourwarehouse fact and dimension tables. For example, you can designate a dimensiontable in your warehouse schema as a fact table in a data mart.

When you create a data mart, you specify the fact table, the dimension tables, andthe references between the tables.

A newly created data mart has all of the necessary structures defined but is emptyand must be filled with a snapshot of the data from the Informix database server.When the data from the database server is loaded in the data mart in theaccelerator server, the data is compressed. After the data is loaded in the datamart, the data mart becomes operational.

Data marts must be based on a snowflake or star schema

The following figure shows a sample schema with two fact tables, DAILY_SALESand DAILY_FORECAST. These fact tables are linked to several dimension tables:STORE, CUSTOMER, PROMOTION, PERIOD, and PRODUCT. There are severalkey references in the fact tables that are used to link to the dimension tables. Forexample in the DAILY_SALES fact table, the PRODKEY column is linked to thePRODKEY column in the PRODUCT dimension table.

5-2 IBM Informix Warehouse Accelerator Administration Guide

Page 61: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Using the schema in Figure 5-1, you can create two data marts. The first data martis based on the DAILY_SALES fact table and the dimension tables that it links to,as shown in Figure 5-2 on page 5-4. A second data mart is based on theDAILY_FORECAST fact table and the dimension tables that it links to, as shown inFigure 5-3 on page 5-5.

PERKEY

PRODKEY

STOREKEY

CUSTKEY

PROMOKEY

QUANTITY_SOLDEXTENDED_PRICEEXTENDED_COSTSHELF_LOCATIONSHELF_NUMBERSTART_SHELF_DATESHELF_HEIGHTSHELF_WIDTH…

DAILY_SALESfact table

DAILY_FORECASTfact table

PERKEY

STOREKEY

PRODKEY

QUANTITY_FORECASTEXTENDED_PRICE_FORECASTEXTENDED_COST_FORECAST

STORE

STOREKEY

STORE_NUMBERCITYSTATEDISTRICTREGION

CUSTOMER

CUSTKEY

NAMEADDRESSC_CITYC_STATEZIPPHONEAGE_LEVEL…

PROMOTION

PROMOKEY

PROMOTYPEPROMODESCPROMOVALUEPROMOVALUE2PROMO_COST

PRODUCT

PRODKEY

BRANDKEY

PRODLINEKEY

UPC_NUMBERP_PRICEP_COSTITEM_DESCPACKAGE_TYPECATEGORYSUB_CATEGORYPACKAGE_SIZE…

PERIOD

PERKEY

CALENDAR_DATEWEEKWEEK_ENDING_DATEMONTHPERIODYEARHOLIDAY_FLAG…

Figure 5-1. A sample star schema with two fact tables

Chapter 5. Data marts and AQTs 5-3

Page 62: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

PERKEY

PRODKEY

STOREKEY

CUSTKEY

PROMOKEY

QUANTITY_SOLDEXTENDED_PRICEEXTENDED_COSTSHELF_LOCATIONSHELF_NUMBERSTART_SHELF_DATESHELF_HEIGHTSHELF_WIDTH…

DAILY_SALESfact table

STORE

STOREKEY

STORE_NUMBERCITYSTATEDISTRICTREGION

CUSTOMER

CUSTKEY

NAMEADDRESSC_CITYC_STATEZIPPHONEAGE_LEVEL…

PROMOTION

PROMOKEY

PROMOTYPEPROMODESCPROMOVALUEPROMOVALUE2PROMO_COST

PRODUCT

PRODKEY

BRANDKEY

PRODLINEKEY

UPC_NUMBERP_PRICEP_COSTITEM_DESCPACKAGE_TYPECATEGORYSUB_CATEGORYPACKAGE_SIZE…

PERIOD

PERKEY

CALENDAR_DATEWEEKWEEK_ENDING_DATEMONTHPERIODYEARHOLIDAY_FLAG…

Figure 5-2. A data mart with the DAILY_SALES fact table

5-4 IBM Informix Warehouse Accelerator Administration Guide

Page 63: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Summary or aggregate tables in data marts

To summarize the granular data in the fact tables and dimension tables, somewarehouse databases use other tables known as summary tables or aggregate tables.For example, a summary table might contain sales information for an entire monthor quarter that is consolidated from fact and dimension tables.

Because Informix Warehouse Accelerator speeds up query processing, it is notnecessary to use summary tables to improve query performance. InformixWarehouse Accelerator queries the fact table and dimension tables directly.

Create a data martAfter you configure the accelerator server and set up the connection between anaccelerator and the database server, you need to create the data marts.

A data mart specifies the collection of tables from a database that is loaded into anaccelerator and the relationships, or references, between these tables. To create thedata mart, you must determine which warehouse queries are good candidates foracceleration.

Create a data mart by using one of the following tools:

DAILY_FORECASTfact table

PERKEY

STOREKEY

PRODKEY

QUANTITY_FORECASTEXTENDED_PRICE_FORECASTEXTENDED_COST_FORECAST

STORE

STOREKEY

STORE_NUMBERCITYSTATEDISTRICTREGION

PRODCUT

PRODKEY

BRANDKEY

PRODLINEKEY

UPC_NUMBERP_PRICEP_COSTITEM_DESCPACKAGE_TYPECATEGORYSUB_CATEGORYPACKAGE_SIZE…

PERIOD

PERKEY

CALENDAR_DATEWEEKWEEK_ENDING_DATEMONTHPERIODYEARHOLIDAY_FLAG…

Figure 5-3. A data mart with the DAILY_FORECAST fact table

Chapter 5. Data marts and AQTs 5-5

Page 64: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v Workload analysis requires that you run a series of statements, storedprocedures, and functions that analyze the schema and the queries to create adata mart definition. After you create the data mart definition, you must deployit to create the data mart.

v IBM Smart Analytics Optimizer Studio requires that you have a detailedknowledge about the schema of the database and the queries that theapplications are sending to the database server. You create the data martdefinition first, and then you deploy it to create the data mart.

Related tasks:“Creating data mart definitions by using IBM Smart Analytics Optimizer Studio”on page 5-16“Creating data mart definitions by using workload analysis” on page 5-7

Workload analysisWorkload analysis is a process of designing an effective data mart.

To get the best performance from accelerated queries, you need to have an optimaldata mart that includes all the necessary columns and tables, but excludes anycolumns and tables that are not used in your warehousing queries. The data martmust also specify the necessary joins between the tables as they are used in thequeries. If your data warehouse has a complex database schema and a workloadthat includes reports that might run hundreds of different queries, it is challengingto determine the optimal data mart definition. Workload analysis gathersinformation about your warehousing queries as you run them, known as queryprobing, and analyzes the resulting data to determine which queries are goodcandidates for acceleration. The columns, tables, and joins used by the queries thatcan be accelerated are included in the data mart definition.

Workload analysis needs to determine the fact table of a query. If parallel databasequery (PDQ) is active, you can specify the fact table with the FACT optimizerdirective. If the FACT optimizer directive is not set, and for inner join queries, thefact table is identified as the table with the most number of rows.

By default, information from all queries that you run during query probing isincluded in the data mart definition. You can customize the data mart definition byincluding specific queries in the definition. If you turn SQL tracing on, you canidentify the probing data that resulted from a specific SQL statement by itsstatement ID.

You can identify specific statements, for example statements that took a certainlength of time to process, or statements that accessed specific tables. With thatinformation, you can include the probing data that resulted from only thesestatements in the mart definition. To view SQL tracing information, run the onstat-g his command or query the syssqltrace table in the sysmaster database. Forexample, in DB-Access, run this SQL statement:SELECT sql_runtime, sql_statement FROM syssqltraceWHERE sql_stmtname matches "SELECT" ORDER BY sql_runtime DESC

By default, query probing is based on the running time of each query. To run thequery probing more quickly, issue the SET EXPLAIN ON AVOID_EXECUTEstatement before you run your query workload. When you issue this statement, thequeries are optimized and the probing data is collected, but a result set is notdetermined or returned. However, if you avoid running the queries, you do notknow exactly how long it takes to run the queries.

5-6 IBM Informix Warehouse Accelerator Administration Guide

Page 65: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

The query probing data is stored in memory. You can view the query probing databy running the onstat -g probe command or by querying the system monitoringinterface.Related reference:

PDQPRIORITY environment variable (Guide to SQL: Reference)

Creating data mart definitions by using workload analysisWorkload analysis involves two main steps, gathering information about yourquery workload, known as query probing, and analysis of the query probing data.

Prerequisites:v You must have an existing database with a star or snowflake schema on a local

database of the server that you are connected to.v You must have warehousing queries that match the acceleration criteria.v A default sbspace must exist.

To create a data mart definition by using workload analysis:1. Connect to the database that contains the data warehouse tables.2. Update database statistics using the LOW option to generate a minimum

amount of statistics for the database by running the UPDATE STATISTICSLOW statement.

3. Enable query probing for the current user session by running the followingcommand:SET ENVIRONMENT use_dwa ’probe start’;

4. If you want to customize your data mart, enable SQL tracing by running thefollowing statement:EXECUTE FUNCTION task("set sql tracing on","1000","4","low","global");

5. Optional. To run the query probing more quickly by simulating running thequery workload, run the SET EXPLAIN ON AVOID_EXECUTE statement. Simulatingthe query workload does not necessarily provide accurate results.

6. Run your warehousing queries.7. If you have enabled SQL tracing, view the SQL trace information about the

workload by running the onstat -g his command.8. Create a new logged database to store the data mart definition.9. Convert the probing data into a data mart definition by running the

probe2mart() stored procedure. You can create a data mart definition from allof the probing data or from the data from specific queries, if SQL tracing isenabled.

10. Generate the data mart definition by running the genmartdef() function. Thisfunction returns a CLOB that contains the data mart definition in XML format.Store the data mart definition in a file.

11. Optional: Remove the probing data from memory before starting any newquery probing sessions by running the following command:SET ENVIRONMENT use_dwa ’probe cleanup’;

After you create the data mart definition, you need to deploy and load data intothe data mart.

Chapter 5. Data marts and AQTs 5-7

Page 66: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:“Deploy and load the data mart” on page 5-18Related reference:Appendix B, “Sysmaster interface (SMI) pseudo tables for query probing data,” onpage B-1“use_dwa environment variable” on page 6-1

UPDATE STATISTICS statement (Guide to SQL: Syntax)

Star-Join Directives (Guide to SQL: Syntax)

Example: Create a data mart from the command lineUse this step-by-step example as a guide to create, deploy, and load a data martfrom the command line using workload analysis.

This example uses the stores_demo database that is created by the commanddbaccessdemo. It also uses the Java classes that are included in InformixWarehouse Accelerator.

The workload is from the following query:SELECT {+ FACT(orders)} first 5 fname,lname,sum(ship_weight)

FROM customer c,orders oWHERE c.customer_num=o.customer_numand state=’CA’ and ship_date is not nullGROUP BY 1,2ORDER BY 3 desc;

The query selects the names of the top five customers from the state CA and thetotal ship weight of their already shipped orders. The query is an inner join. Theorders table is the fact table. The customer table is the dimension table. Since theorders table has fewer rows than the customer table, the {+ FACT(orders)}optimizer hint is required. Otherwise the customer table would be considered asthe fact table.

The following commands correspond to steps in the task “Creating data martdefinitions by using workload analysis” on page 5-7.

The SQL statements used in this example were executed using the DB-Accessutility, and are prompted by ">". Commands executed from the shell are promptedby "$".

Step 1: Connect to the database

Connect to the database. This example uses the stores_demo database:> connect to ’stores_demo’;Connected.

Step 2: Update statistics

Update the statistics on the database:> update statistics low;Statistics updated.

Step 3: Start probing

Set the environment variable to activate probing:

5-8 IBM Informix Warehouse Accelerator Administration Guide

Page 67: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

> SET ENVIRONMENT use_dwa ’probe start’;Environment set.

Step 4: Optional - Enable SQL tracing

In a separate session, connect as user informix to the sysadmin database andactivate SQL tracing:> execute function task("set sql tracing on","1500","4","low", "global");(expression) SQL Tracing ON: ntraces=1500, size=4056, level=Low,mode=Global.1 row(s) retrieved.

Step 5: Skip running the query workload

When you issue this statement, the queries are optimized and probed but a resultset is not determined or returned.

Important: If you want to process the probing data based on the runtime of thequeries, then turn on SQL tracing and do not use the AVOID_EXECUTE option ofthe SET EXPLAIN statement. If you avoid running the queries, you will not knowhow long it takes to really run the queries.> set explain on avoid_execute;Explain set.

Step 6: Run the query workload

Using this example, the SQL statements are:> SELECT {+ FACT(orders)} first 5 fname,lname,sum(ship_weight)

FROM customer c,orders oWHERE c.customer_num=o.customer_num and state=’CA’and ship_date is notnullGROUP BY by 1,2ORDER BY by 3 desc;fname lname (sum)

No rows found.

The reason no rows are returned in this example is that the SET EXPLAIN ONAVOID_EXECUTE statement has been used.

Step 7: View the SQL trace information

You can use the onstat command or query the SMI tables to view the SQL traceinformation.

To use the onstat command:$ onstat -g his

IBM Informix Dynamic Server Version 11.70.FC3 -- On-Line -- Up 00:53:06 --182532 Kbytes

Statement history:

Trace Level LowTrace Mode GlobalNumber of traces 1500Current Stmt ID 2Trace Buffer size 4056Duration of buffer 42 SecondsTrace Flags 0x00001611Control Block 0x4dd51028

Chapter 5. Data marts and AQTs 5-9

Page 68: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Statement # 2: @ 0x4dd51058

Database: 0x100153Statement text:select {+ FACT(orders)} first 5 fname,lname,sum(ship_weight)from customer c,orders owhere c.customer_num=o.customer_num and state=’CA’ andship_date is not null group by 1,2 order by 3 desc

Statement information:Sess_id User_id Stmt Type Finish Time Run Time TX Stamp PDQ51 29574 SELECT 10:39:09 0.0000 33f4e 0

Statement Statistics:Page Buffer Read Buffer Page Buffer WriteRead Read % Cache IDX Read Write Write % Cache0 0 0.00 0 0 0 0.00

Lock Lock LK Wait Log Num Disk MemoryRequests Waits Time (S) Space Sorts Sorts Sorts0 0 0.0000 0.000 B 0 0 0

Total Total Avg Max Avg I/O Wait Avg RowsExecutions Time (S) Time (S) Time (S) IO Wait Time (S) Per Sec1 0.0000 0.0000 0.0000 0.000000 0.000000 678122.8357

Estimated Estimated Actual SQL ISAM Isolation SQLCost Rows Rows Error Error Level Memory10 2 0 0 0 NL 25304

To query the SMI tables to view the SQL trace information:> SELECT sql_id,sql_runtime, sql_statement

FROM sysmaster:syssqltraceWHERE ql_stmtname=’SELECT’ORDER BY sql_runtime desc;

sql_id 2sql_runtime 1.47450285e-06sql_statement select {+ FACT(orders)} first 5 fname,lname,sum(ship_weight)

from customer c,orders o where c.customer_num=o.customer_numand state=’CA’ and ship_date is not null group by 1,2 order by 3 desc

Step 8: View the probing data

To see the data that was gathered from running the query workload, you can runan onstat command or query the SMI tables.

To use the onstat -g probe command:$ onstat -g probe

DWA probing data for database stores_demo:

statement 2:columns: tabid[colno,...]

100[1,2,3,8]102[3,7,8] f

joins: tabid[colno,...] = tabid[colno,...] (type) {u:unique}102[3] = 100[1] (inner) u

Output description:

5-10 IBM Informix Warehouse Accelerator Administration Guide

Page 69: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v Statement 2 accesses tables: the customer table with tabid 100 and the orderstable with tabid 102

v In the customer table, columns 1, 2, 3, and 8 are accessedv In the orders table, columns 3, 7, and 8 are accessedv The orders table is the fact tablev Column 3 in the orders table is joined with column 1 in the customers tablev The join is an inner joinv The customers table has a unique index on column 1

You can verify that the probing data was gathered by connecting to the sysmasterdatabase and querying the SMI tables:> SELECT * FROM sysprobetables;

dbname stores_demosql_id 2tabid 100fact n

dbname stores_demosql_id 2tabid 102fact y

2 row(s) retrieved.

> SELECT * FROM sysprobecolumns;

dbname stores_demosql_id 2tabid 100colno 1

dbname stores_demosql_id 2tabid 100colno 2

dbname stores_demosql_id 2tabid 100colno 3

dbname stores_demosql_id 2tabid 100colno 8

dbname stores_demosql_id 2tabid 102colno 3

dbname stores_demosql_id 2tabid 102colno 7

dbname stores_demosql_id 2tabid 102colno 8

7 row(s) retrieved.

Chapter 5. Data marts and AQTs 5-11

Page 70: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

> SELECT * FROM sysprobejds;

dbname stores_demosql_id 2jd 1ctabid 102ptabid 100type iuniq y

1 row(s) retrieved.

> SELECT * FROM sysprobejps;

dbname stores_demosql_id 2jd 1jp 1ccolno 3pcolno 1

1 row(s) retrieved.

Step 9: Create a logging database

The stores_demo database is not a logging database. A different database isrequired to store the data mart information generated by running the probe2mart()stored procedure:> CREATE DATABASE stores_marts WITH LOG;Database created.

Step 10: Run the probe2mart () stored procedure

Connect to the logging database stores_marts and run the stored procedure:$ dbaccess stores_marts -> execute procedure probe2mart(’stores_demo’,’orders_customer_mart’);Routine executed.

Step 11: Run the genmartdef() function and store the result in a file

Connect to the logging database stores_mart, where the probing data that wasgenerated by the probe2mart stored procedure is stored:$ dbaccess stores_marts -> execute function lotofile(genmartdef(’orders_customer_mart’),’orders_customer_mart.xml!’,’client’);(expression) orders_customer_mart.xml1 row(s) retrieved.

To view the contents of the data mart definition file:$ cat orders_customer_mart.xml<?xml version="1.0" encoding="UTF-8" ?><dwa:martModel xmlns:dwa="http://www.ibm.com/xmlns/prod/dwa" version="1.0">

<mart name="orders_customer_mart"><table name="customer" schema="informix" isFactTable="false" >

<column name="customer_num"/><column name="fname"/><column name="lname"/><column name="state"/>

</table><table name="orders" schema="informix" isFactTable="true" >

<column name="customer_num"/>

5-12 IBM Informix Warehouse Accelerator Administration Guide

Page 71: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

<column name="ship_date"/><column name="ship_weight"/>

</table><reference

referenceType="LEFTOUTER"isRuntimeJoin="true"parentCardinality="1"dependentCardinality="n"dependentTableSchema="informix"dependentTableName="orders"parentTableSchema="informix"parentTableName="customer"><parentColumn name="customer_num"/><dependentColumn name="customer_num"/>

</reference></mart>

</dwa:martModel>

Step 12: Deploy and load the data mart

You can use the Java classes that are included with Informix WarehouseAccelerator to deploy and load the data mart.

To deploy the data mart:$ java createMart <accelerator name> orders_customer_mart.xml

To load the data mart:$ java loadMart <accelerator name> orders_customer_mart NONE

See the dwa_java_reference.txt file in the dwa/example/cli/ directory for moreinformation about these sample Java classes.Related concepts:“Java classes for Informix Warehouse Accelerator” on page 1-8

Contents of query probing dataThe query probing data contains a set of records when SQL tracing is used, or asingle record when SQL tracing is not used.

Each record is identified by a statement ID. A record contains:v The database name the user was connected tov A list of tables, identified by their table id (tabid)v A list of columns for each table, identified by their column number (colno)v A list of references between each pair of tables, also known as the join

descriptorsv A list of column pairs for each join descriptor, also known as the join predicates

A join predicate in the probing data corresponds to an equality join predicatebetween columns of different tables in the query. For example:table_1.col_a = table_2.col_x

A join descriptor is comprised of:v All of the join predicates of the same pair of tables. For example:

table_1.col_a = table_2.col_x andtable_1.col_b = table_2.col_y andtable_1.col_c = table_2.col_z

v The type of the join - an inner join or left outer join.

Chapter 5. Data marts and AQTs 5-13

Page 72: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v Information about any unique indexes on the dimension table of the join. Thedimension table is the right table in case of a left outer join. The unique indexmust be on the complete set of columns contained in this join descriptor.

The probe2mart stored procedureThe probe2mart stored procedure is used to convert the data that is gathered fromprobing into a data mart definition.

Syntax

The syntax of the stored procedure is:

�� probe2mart ( ' database ' , ' mart_name ' ) ;, sqlid

��

databaseThe name of the database that contains the data warehouse. This is thewarehouse database on which the workload queries are run. See Usage.

mart_nameThe name that you want to use for the data mart definition. The name isalso the name of the data mart that is created later, based on the data martdefinition. If the name you specify is an existing data mart definition, theprobing data is merged into the already existing data mart definition. If thedata mart definition you specify does not exist, the data mart definition iscreated.

sqlid Optional. The ID of the query SQL statement, which identifies the probingdata from that query. If the sqlid is not provided, all of the probing datafrom the specified database is added to the data mart definition.

Usage

The probe2mart stored procedure should be run from a different database than thewarehouse database. This separate database must be a logging database. You canuse a test database, if the test database is already a logging database, or you cancreate a different database that keeps these tables separated from your other tables.

Note: Create a separate logging database to use with the probe2mart storedprocedure. Using a separate makes it much easier to revert from Informix 11.70 toan earlier version of Informix.

When the stored procedure is run, the probing data is processed and stored in thelogging database in a set of permanent tables.

The tables keep the data mart definition in a relational format. The tables areautomatically created when the probing data is processed into a data martdefinition for the first time.

The probe2mart stored procedure creates a data mart definition by converting theprobing data and inserting rows into the following tables.

Table 5-1. Tables created by the probe2mart stored procedure

Table Description

'informix'.iwa_marts Names of the data mart definitions

5-14 IBM Informix Warehouse Accelerator Administration Guide

Page 73: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 5-1. Tables created by the probe2mart stored procedure (continued)

Table Description

'informix'.iwa_tables All of the tables used in any data martdefinition

'informix'.iwa_columns All columns used in any data martdefinition

'informix'.iwa_mtabs Tables for a specific data mart definition

'informix'.iwa_mcols Columns for a specific data mart definition

'informix'.iwa_mrefs References (join descriptors) of a specificdata mart definition

'informix'.iwa_mrefcols Reference columns (join predicates) of aspecific data mart definition

Examples

To convert, or merge, all of the probing data into a data mart definition, use thisform of the syntax:EXECUTE PROCEDURE probe2mart(’database’, ’mart_name’);

For example, to generate a data mart definition named salesmart from all ofprobing data that is available for the database sales, use this statement:EXECUTE PROCEDURE probe2mart(’sales’, ’salesmart’);

You can also merge the probing data from a specific query into a data martdefinition. You need to look up the SQL ID number of the query which wascaptured by SQL tracing. SQL tracing must be ON to designate data from specificqueries. Queries are identified by a statement ID.

For example, to merge the probing data from SQL statement 8372 into the datamart definition salesmart, run this command:EXECUTE PROCEDURE probe2mart(’sales’, ’salesmart’, 8372);

To create a data mart definition from queries that run longer than 10 seconds, usethis SQL statement:SELECT probe2mart(’sales’,’salesmart’,sql_id)

FROM sysmaster:syssqltraceWHERE sql_runtime > 10;

Related reference:Chapter 8, “Reversion requirements for an Informix warehouse edition server andInformix Warehouse Accelerator,” on page 8-1

The genmartdef() functionThe genmartdef() function returns a CLOB that contains the data mart definition inan XML format.

Syntax

The syntax of the function is:genmartdef(’mart name’);

You can either issue the genmartdef() function by itself, or incorporate it as aparameter within the LOTOFILE() function. Using the genmartdef() function with

Chapter 5. Data marts and AQTs 5-15

Page 74: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

the LOTOFILE() function places the CLOB into an operating system file.

Examples

Use the genmartdef() function as a parameter within the LOTOFILE() function:EXECUTE FUNCTION LOTOFILE(genmartdef(’salesmart’),

’salesmart.xml!’,’client’));

The following example generates the data mart definition for salesmart. Theresulting CLOB is used as a parameter within the LOTOFILE() function. TheLOTOFILE() function stores the resulting CLOB in an operating system file namedsalesmart.xml on the client computer.SELECT lotofile(genmartdef(’salesmart’),’salesmart.xml!’,’client’)

FROM iwa_marts WHERE martname=’salesmart’;

Related reference:

LOTOFILE Function (Guide to SQL: Syntax)

Removing probing data from the databaseAfter you no longer need the probing data, you can use a SET ENVIRONMENTstatement to remove it from the database that contains the warehousing data.Remove probing data when you want to start a new probing session and you wantto ensure that none of the previous probing data that is stored in memory isincluded in the new data mart definition.

To remove all of the probing data from the database:1. Connect to the database where the warehousing data resides.2. Run the SET ENVIRONMENT use_dwa ’probe cleanup’ statement.

For example:$ dbaccess stores_demo -> set environment use_dwa ’probe cleanup’;Environment set.

To check if the probing data is removed, run the onstat -g probe command.

Important: The probing data is stored in memory. The data is automaticallyremoved when the database server is shut down.

Related reference:“use_dwa environment variable” on page 6-1

Creating data mart definitions by using IBM Smart AnalyticsOptimizer Studio

You can use Smart Analytics Optimizer Studio to create the data mart definitionswhen you are familiar with the database schema and the application queries thatare sent to the database server.

Smart Analytics Optimizer Studio estimates how large the data mart might becomeand determines if there is sufficient space on the accelerator server for theproposed data mart.

To create a data mart definition using Smart Analytics Optimizer Studio use thefollowing steps:1. On the computer where Smart Analytics Optimizer Studio is installed, start

Smart Analytics Optimizer Studio:

5-16 IBM Informix Warehouse Accelerator Administration Guide

Page 75: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

v On Linux, open the directory where you installed Smart Analytics OptimizerStudio, and then run the ./datastudio command.

v On Windows, select Start > Programs > IBM Smart Analytics OptimizerStudio 1.1

2. Create a new accelerator project. Right-click the Accelerators folder and selectNew Accelerator or choose File > New > Accelerator project.

3. Use the New Data Mart wizard to create a data mart definition. Choose File >New > Data Mart to start the New DataMart Wizard. The New Data Martwizard uses the existing database connection to read the catalog tables in thedatabase and to retrieve information about the objects in the database, such asthe tables, constraints, and so on. The wizard uses this information to createresources in the workspace on your computer.

4. Add database tables to the data mart definition.v A single data mart definition can have a maximum of 255 tables or 750

columnsv If you add a table to your data mart definition that includes a data type

column that is not supported, you must remove that column from the datamart definition

5. Create references, or joins, between tables in the data mart definition (ifnecessary).

6. Designate the fact table for the data mart definition.7. Specify the table columns to load into the accelerator. Select the table in the

Canvas and look at the Properties view. click the Columns page to view a listof the columns in that table. By default all of the columns in the table areincluded in the data mart. Clear the columns that you do not want included.

8. Check the size of a data mart definition before it is deployed. You can comparea size estimate of the data mart definition with the memory that is available onthe accelerator server. If necessary, you can change the join type of tablereferences or omit specific columns that are rarely or never needed to reducerequired memory.

9. Validate the integrity of the data mart definition. Ensure that the syntax andstructure of a data mart definition are correct and that the data mart can besafely deployed to the accelerator server.

After you create the data mart definition, you need to deploy and load data intothe data mart.Related tasks:“Deploying and loading a data mart by using IBM Smart Analytics OptimizerStudio” on page 5-19

References in data martsA reference is a join between two database tables that indicates how the tables inthe data mart are related to each other.

One-to-many joins

A one-to-many join connects the columns of a primary key, unique constraint orunique, nonnullable index of the parent table with columns of the child table. Anyrow or tuple in the child table is related to a maximum of one row or tuple in theparent table. If the table has a primary key, the corresponding key columns areselected automatically. You can override this automatic selection by selectinganother unique constraint or unique index.

Chapter 5. Data marts and AQTs 5-17

Page 76: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

If the parent table does not have a primary key, select one of the unique keys. Atleast one unique constraint or unique nonnullable index is required, otherwise theone-to-many reference cannot be created.

Important: One-to-many joins lead to a better query performance thanmany-to-many joins. If one of the tables that you want to use has a uniqueconstraint, unique index, or primary key on the join columns, use a one-to-manyjoin.

Many-to-many joins

In a many-to-many join, one or more columns of the parent table are joined withan equal number of columns in the child table. The values of these columns do nothave to be unique and you do not have to enforce uniqueness through theselection of a constraint. This means that any row or tuple in the child table canrelate to multiple tuples in the parent table.

Join tables at run timeWhen you specify that the tables are joined at run time, the tables are joined in thesystem memory of the accelerator server when the query is run.

Runtime joins require less system memory to hold the data mart.

Fact table for the data martTypical queries against a data mart join the fact table with the dimension tablesand group information by a specific criteria.

When you specify the tables to use for the data mart, IBM Smart AnalyticsOptimizer Studio automatically identifies the fact table in the warehouse on theInformix database server. The fact table is partitioned across the worker nodes ofthe accelerator server to reach a maximum degree of parallel processing.

The fact table for the data mart does not necessarily need to be the fact table in thewarehouse that you created on the Informix database server.

By default, the largest table that you identify for the data mart is designated as thefact table by IBM Smart Analytics Optimizer Studio. However, you can specify anytable that is part of a star or snowflake schema as the fact table for a data mart.

Deploy and load the data martTo deploy a data mart, you specify the accelerator that will contain the data martdefinition file. When you load a data mart, the related data is unloaded from theInformix tables and transferred to the accelerator server.

When you deploy a data mart, the data mart is in the LOAD PENDING state andis disabled until you load data into the data mart.

During the loading phase, for most data marts, the data is gathered from severaldifferent tables. After the data is loaded into the data mart, it is enabledautomatically and is in the ACTIVE state. Loading data into a data mart can takeseveral hours, depending on the size and the amount of data that is contained inthe tables.

5-18 IBM Informix Warehouse Accelerator Administration Guide

Page 77: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Deploying and loading a data mart by using IBM SmartAnalytics Optimizer Studio

When you use Smart Analytics Optimizer Studio to deploy the data mart, the datamart definition is imported from an XML file into an accelerator project in SmartAnalytics Optimizer Studio. When data is loaded into the data mart, it is enabledautomatically and is in the ACTIVE state. You can disable or enable a loaded datamart to switch the query acceleration for the data mart on or off.

As part of creating a data mart definition, IBM Smart Analytics Optimizer Studioestimates the amount of space required for the data mart and the data martdefinition is validated.

Important: Loading data into a data mart can take several hours, depending onthe size and the amount of data that is contained in the tables.1. Import the file into Smart Analytics Optimizer Studio:

a. On the computer where the Smart Analytics Optimizer Studio is installed,start Smart Analytics Optimizer Studio:v On Linux, open the directory where you installed Smart Analytics

Optimizer Studio, and then run the ./datastudio command.v On Windows, select Start > Programs > IBM Smart Analytics Optimizer

Studio 1.1

b. Create an accelerator project. Right-click the Accelerators folder and selectNew Accelerator or choose File > New > Accelerator project.

c. Right-click the new accelerator project in the Project Explorer window. SelectImport. The value Data Mart Import is selected by default. Click Next.

d. Locate the generated file. Verify that Import into existing project and thename of the current project is selected. Click Finish.

2. You can deploy the data mart from either the Data Source Explorer or from theProperties view of the data mart.

3. You can start the load process from either the Data Source Explorer or from theProperties view of the data mart.

4. Right-click the data mart and select Load.5. Choose the level of consistency that you want for the loaded data by specifying

a value for the locking parameter for the data load. Following are the valuesthat you can choose from:

Option Description

NONE No locking is done during the load. Thedata is read from the different tables similarto a dirty read. Other user sessions canchange the data during the load operation.As a result the loaded data might beinconsistent.

The data inconsistencies might be acceptableif the primary goal of the data mart is tocreate statistics and discover trends ratherthan to find the exact values of specific datarows.

TABLE Each table is locked for the duration it takesto gather the load data from the table. Theloaded data is consistent within each table,but not necessarily across different tables.

Chapter 5. Data marts and AQTs 5-19

Page 78: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Option Description

MART All of the tables in the data mart are lockedfor the duration of the load. The loaded datais consistent from all of the tables. However,all of the other user sessions are blockedfrom changing the data in the tables that areinvolved in the load.

Refreshing the data in a data martYou can refresh the data in a data mart by creating a new data mart. You can alsorefresh data by dropping and loading the data in a specific partition or in anon-fragmented table.

Refreshing all the data in a data martYou can refresh all the data in a data mart while queries are being accelerated bycreating a new data mart based on your existing data mart definition. You do notneed to suspend query acceleration in order to drop and re-create the original datamart.

To refresh the data-mart data, create a new data mart. As soon as the new datamart is loaded, the database server uses the new data mart for matching newqueries to AQTs. New candidate queries that are sent to the accelerator server willuse the new data mart.

Drop the original data mart and deploy and load the new data mart. The new andold data marts must have the same data mart definition, but different names.

If you have enough memory, you can create the new data mart and then drop theoriginal data mart. During the load phase, you need approximately twice as muchmemory as the original data mart uses. Otherwise, drop the original data mart andthen recreate it. Make sure you save the data mart definition file with a differentfile name before you drop the original data mart.

In this example, datamart_1 has been loaded and sent to the accelerator server forprocessing. The data for datamart_1 has changed. You want any new queries thatare sent to the database server to use the new data.1. Create a data mart that has the same definition as datamart_1, but name the

data mart datamart_2.2. Load datamart_2. When the data loading for datamart_2 completes, the

accelerator server uses datamart_2 with the refreshed data for incomingqueries.

3. Disable datamart_1.4. Optional: Drop datamart_1. When multiple data marts use the same tables, the

Informix database server uses the latest data mart to accelerate the queries.

5-20 IBM Informix Warehouse Accelerator Administration Guide

Page 79: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:“Managing a data mart” on page 5-28Related tasks:“Refreshing data mart data at the partition level”

Refreshing data mart data at the partition levelUse the dropPartMart() and loadPartMart() functions to refresh the data in aspecific partition in a fragmented table instead of refreshing all the data in the datamart. If your database table is fragmented, your data mart table follows the samefragmentation scheme. Refreshing data by partition is faster than refreshing anentire data mart.

Prerequisite

Register the dropPartMart() and loadPartMart() functions in the database by usingthe DB-Access utility:$ dbaccess database $INFORMIXDIR/etc/boot1170XC5iwa.sql

You can refresh the partition data by reloading the data in the partition, removing(dropping) the data in the partition, or adding data to the partition.v Reload: Follow these steps when the data in one of the fragments in a

fragmented table in the database has changed. For example, you want to addnew data for the current week.1. Use the oncheck -pt command to look up the fragment (partition name or

number) in the table that has new data in the database.2. Use the dropPartMart() function to drop the data from the corresponding

partition in the data mart.3. Use the loadPartMart() function to load the new data in the partition in the

data mart.v Remove: Follow these steps when you want to remove the data in the partition.

For example, you want to delete data from an earlier week.1. Use the oncheck -pt command to look up the fragment (partition name or

number) to be detached from the table in the database.2. Use the dropPartMart() function to drop the data from the corresponding

partition in the data mart.3. Detach the fragment from the table in the database.

v Add: Follow these steps when you want to add data from a table fragment inthe database. For example, you want to add data for a different week. Thefragment can be a stand-alone table that contains the new data.1. Attach the new fragment to the fragmented table in the database.2. Use the oncheck -pt command to look up the new fragment (partition name

or number).3. Use the loadPartMart() function to load the new data in the new partition in

the data mart.

Chapter 5. Data marts and AQTs 5-21

Page 80: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related tasks:

Ensuring no data movement when you attach a fragment (Performance Guide)Related reference:

oncheck -pt and -pT: Display tblspaces for a Table or Fragment(Administrator's Reference)

ATTACH Clause (Guide to SQL: Syntax)

DETACH Clause (Guide to SQL: Syntax)

Example: Refresh data mart data in partitions and tablesThis example shows how to refresh data mart data in a fact table partition and in adimension table. It also shows how to refresh data mart data by adding ordropping a fact table partition.

This example uses a data mart that has three database tables:v Dimension table customer contains data for the customer ID, the customer name,

and the customer’s age. The customer table is not fragmented.v Dimension table store contains data for the store ID and the city where the store

is located. The store table is not fragmented.v Fact table sales contains data for the revenue volume that a customer made in a

store. The sales table is fragmented by country where the store is located.

In this example, you run a query on the data mart that lists per store, the averageage of the customers and the total volume of the store. The list is sorted by thetotal volume of the stores in descending order.

You refresh the data in the data mart for the following changes:v Adding new data for a specific store to the fact tablev Updating a dimension tablev Adding a storev Removing a store

Prerequisite

Register the dropPartMart() and loadPartMart() functions in the database by usingthe DB-Access utility:$ dbaccess database $INFORMIXDIR/etc/boot1170XC5iwa.sql

Create the tables, insert the data, create the data mart, and run thequery1. Create the tables in the database:

create table customer(customer_id int primary key,customer_name varchar(32),customer_age int);create table store(store_id int primary key,store_city varchar(18));create table sales(customer int references customer(customer_id),store int references store(store_id),volume decimal(9,2))fragment by expression

5-22 IBM Informix Warehouse Accelerator Administration Guide

Page 81: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

partition us (store = 101) in dbs1,partition india (store = 102) in dbs2,partition germany (store = 103) in dbs3;

2. Insert data into the three tables:insert into customer values (1, "John Smith", 22);insert into customer values (2, "Joe Smith", 32);insert into customer values (3, "John Doe", 57);

insert into store values (101, "San Jose");insert into store values (102, "New Delhi");insert into store values (103, "Munich");

insert into sales values (1, 101, 20.22);insert into sales values (2, 101, 80.24);insert into sales values (3, 102, 34.34);insert into sales values (1, 103, 23.28);insert into sales values (3, 101, 20.22);insert into sales values (3, 102, 80.24);insert into sales values (1, 103, 34.34);insert into sales values (2, 101, 23.28);

3. Create a data mart called salesmart on accelerator myAccelerator. Use thefollowing schema for the data mart:customer --> sales <-- storerelationships:(sales.customer = customer.customer_id) and (sales.store = store.store)

4. Run the query:set environment use_dwa ’accelerate on’;select

store_city as city,avg(customer_age)::integer as avg_age,sum(volume) as total_volumefrom sales,customer,storewhere sales.customer = customer.customer_id

and sales.store = store.store_idgroup by store_cityorder by 3 desc;

Query results:city avg_age total_volumeSan Jose 35 143.96New Delhi 57 114.58Munich 22 57.62

Refresh the data in a fact table partition

Add new data for a specific store to the fact table.1. Load new data for New Delhi store:

insert into sales values (1, 102, 98.23);insert into sales values (2, 102, 13.23);insert into sales values (3, 102, 87.23);

2. Update the data mart fact table partition:execute function dropPartMart(’myAccelerator’,’salesmart’,’table_owner’,’sales’,’india’);execute function loadPartMart(’myAccelerator’,’salesmart’,’table_owner’,’sales’,’india’);

3. Run the query:select

store_city as city,avg(customer_age)::integer as avg_age,sum(volume) as total_volume

Chapter 5. Data marts and AQTs 5-23

Page 82: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

from sales,customer,storewhere sales.customer = customer.customer_id

and sales.store = store.store_idgroup by store_cityorder by 3 desc;

The data for New Delhi is updated in the query results.city avg_age total_volumeNew Delhi 45 313.27San Jose 35 143.96Munich 22 57.62

Refresh the data in a dimension table

Update a dimension table.1. Update the data in the table customer:

update customerset customer_age = customer_age + 1where customer_name = ’John Smith’;

2. Update the data mart dimension table:execute function dropPartMart(’myAccelerator’,’salesmart’,’table_owner’,’customer’,’customer’);execute function loadPartMart(’myAccelerator’,’salesmart’,’table_owner’,’customer’,’customer’);

3. Run the query:select

store_city as city,avg(customer_age)::integer as avg_age,sum(volume) as total_volumefrom sales,customer,storewhere sales.customer = customer.customer_id

and sales.store = store.store_idgroup by store_cityorder by 3 desc;

The data for the avg_age column is updated in the query results.city avg_age total_volumeNew Delhi 45 313.27San Jose 36 143.96Munich 23 57.62

Add a fact table partition

Add a store for Sydney, Australia.1. Create a stand-alone table, sales_australia that has the new data. Attach the

sales_australia table to the sales fact table as a fragment.insert into store values(104, "Sydney");create table sales_australia(customer int references customer(customer_id),store int references store(store_id),volume decimal(9,2)) in dbs4;alter table sales_australia add constraint check (store=104);insert into sales_australia values (1, 104, 28.17);insert into sales_australia values (3, 104, 47.88);insert into sales_australia values (1, 104, 19.12);insert into sales_australia values (2, 104, 66.09);alter fragment on table salesattach sales_australiaas partition australia (store = 104)after germany;

5-24 IBM Informix Warehouse Accelerator Administration Guide

Page 83: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

2. Update the data mart dimension table store:execute function dropPartMart(’myAccelerator’,’salesmart’,’table_owner’,’store’,’store’);execute function loadPartMart(’myAccelerator’,’salesmart’,’table_owner’,’store’,’store’);

3. Load the data mart fact table partition australia to the fact table sales:execute function loadPartMart(’myAccelerator’,’salesmart’,’table_owner’,’sales’,’australia’);

4. Run the query:select

store_city as city,avg(customer_age)::integer as avg_age,sum(volume) as total_volumefrom sales,customer,storewhere sales.customer = customer.customer_id

and sales.store = store.store_idgroup by store_cityorder by 3 desc;

The data for the city Sydney is included in the query results.city avg_age total_volumeNew Delhi 45 313.27Sydney 33 161.26San Jose 36 143.96Munich 23 57.62

Remove a fact table partition

Remove the store in Munich, Germany.1. Drop the data mart germany partition from the sales fact table:

execute function dropPartMart(’myAccelerator’,’salesmart’,’table_owner’,’sales’,’germany’);

2. Detach the corresponding fragment from the sales fact table in the database anddelete the germany data:alter fragment on table sales detach germany sales_germany;delete from store where store_city=’Munich’;

3. Update the data mart dimension table store:execute function dropPartMart(’myAccelerator’,’salesmart’,’table_owner’,’store’,’store’);execute function loadPartMart(’myAccelerator’,’salesmart’,’table_owner’,’store’,’store’);

4. Run the query:select

store_city as city,avg(customer_age)::integer as avg_age,sum(volume) as total_volumefrom sales,customer,storewhere sales.customer = customer.customer_id

and sales.store = store.store_idgroup by store_cityorder by 3 desc;

The data for the city Munich is removed from the query results.city avg_age total_volumeNew Delhi 45 313.27Sydney 33 161.26San Jose 36 143.96

Chapter 5. Data marts and AQTs 5-25

Page 84: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Related concepts:“Create a data mart” on page 5-5Related reference:“dropPartMart() function”“loadPartMart() function” on page 5-27

Refreshing data mart data in a tableYou can use the dropPartMart() and loadPartMart() functions to refresh the data ina table instead of refreshing all the data in the data mart. The table must be anon-fragmented table. If your database table is not fragmented, your data marttable is also not fragmented. Refreshing the data in a table is faster than refreshingan entire data mart.

Prerequisite

Register the dropPartMart() and loadPartMart() functions in the database by usingthe DB-Access utility:$ dbaccess database $INFORMIXDIR/etc/boot1170XC5iwa.sql

You can refresh the data by reloading the table data. Follow these steps when thedata in one table in the database has changed. For example, when have inserted,deleted, or updated the rows in the table.1. Identify the table name or use the oncheck -pt command to look up the table’s

partition number.2. Use the dropPartMart() function to drop the data from the table in the data

mart.3. Use the loadPartMart() function to load the new data in the table in the data

mart.Related reference:

oncheck -pt and -pT: Display tblspaces for a Table or Fragment(Administrator's Reference)

dropPartMart() functionUse the dropPartMart() function to drop the data in one partition in a fragmentedtable. You can also use the dropPartMart() function to drop all of the data from anon-fragmented table.

Syntax

For parameters, the dropPartMart() function takes string values that are enclosedin single quotation marks and that are separated by commas.

�� execute function dropPartMart �

� ( 'accelerator_name' , 'mart_name' , 'table_owner' , 'table_name' , 'partition' ) ��

Parameters

accelerator_nameThe name of the accelerator

mart_nameThe name of the data mart

5-26 IBM Informix Warehouse Accelerator Administration Guide

Page 85: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

table_ownerThe owner of the table

table_nameThe name of the table

partitionThe name of the partition in a fragmented table or the name of thenon-fragmented table. The value can also be a partition number that isrepresented as a string value. You can use the oncheck -pt command to lookup the partition name, the table name, or the partition number.

Return values

The dropPartMart() function returns the text string "The operation completedsuccessfully" or an error message.

Examples

The following example drops the data in partition ’part1’ in the fragmented table’tab22’.execute function dropPartMart(’myAccelerator’,’myMart’,’user10’,’tab22’,’part1’);

The following example drops the data in partition ’0x100124’ in the fragmentedtable ’tab22’.execute function dropPartMart(’myAccelerator’,’myMart’,’user10’,’tab22’,’0x100124’);

The following example drops the data in the non-fragmented table ’tab22’. In thisexample, the table name ’tab22’ is used for both the table_name parameter and forthe partition parameter.execute function dropPartMart(’myAccelerator’,’myMart’,’user10’,’tab22’,’tab22’);

Related reference:“loadPartMart() function”

oncheck -pt and -pT: Display tblspaces for a Table or Fragment(Administrator's Reference)

loadPartMart() functionUse the loadPartMart() function to load the data in one partition in a fragmentedtable. You can also use the loadPartMart() function to load all of the data in anon-fragmented table.

Syntax

For parameters, the loadPartMart() function takes string values that are enclosed insingle quotation marks and that are separated by commas.

�� execute function loadPartMart �

� ( 'accelerator_name' , 'mart_name' , 'table_owner' , 'table_name' , 'partition' ) ��

Parameters

accelerator_nameThe name of the accelerator

Chapter 5. Data marts and AQTs 5-27

Page 86: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

mart_nameThe name of the data mart

table_ownerThe owner of the table

table_nameThe name of the table

partitionThe name of the partition in a fragmented table or the name of thenon-fragmented table. The value can also be a partition number that isrepresented as a string value. You can use the oncheck -pt command to lookup the partition name, the table name, or the partition number.

Return values

The loadPartMart() function returns the text string "The operation completedsuccessfully" or an error message.

Examples

The following example loads the data in partition ’part1’ of the fragmented table’tab22’.execute function loadPartMart(’myAccelerator’,’myMart’,’user10’,’tab22’,’part1’);

The following example loads the data in partition ’0x100124’ of the fragmentedtable ’tab22’.execute function loadPartMart(’myAccelerator’,’myMart’,’user10’,’tab22’,’0x100124’);

The following example loads the data in the non-fragmented table ’tab22’. In thisexample, the table name ’tab22’ is used for both the table_name parameter and forthe partition parameter.execute function loadPartMart(’myAccelerator’,’myMart’,’user10’,’tab22’,’tab22’);

Related reference:“dropPartMart() function” on page 5-26

oncheck -pt and -pT: Display tblspaces for a Table or Fragment(Administrator's Reference)

Managing a data martYou might need to drop or recreate a data mart, for example, if the schema of theunderlying tables is changed, or if you create a new data mart and need to removean old data mart.

When you modify the schema for the tables on the database server, you must dropand recreate the data mart. Examples of schema modification operations include:v Renaming tablesv Renaming columnsv Altering tables to add or drop columnsv Changing the datatype of the columnsv Adding or dropping constraints

5-28 IBM Informix Warehouse Accelerator Administration Guide

Page 87: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Drop the original data mart and deploy and load the new data mart. The new andold data marts must have the same data mart definition, but different names. Makesure you save the data mart definition file with a different file name before youdrop the original data mart.Related tasks:“Refreshing all the data in a data mart” on page 5-20

Dropping a data martYou can drop a data mart if you no longer need the data mart or if you need toupdate the data in a data mart.

In Smart Analytics Optimizer Studio, to drop a data mart, go to either the DataSource Explorer folder or to the Properties view.Related concepts:“Tools for administering Informix Warehouse Accelerator” on page 1-8

Chapter 5. Data marts and AQTs 5-29

Page 88: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

5-30 IBM Informix Warehouse Accelerator Administration Guide

Page 89: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 6. Turning on query acceleration

Before queries can be routed to the accelerator server for processing, you must setthe use_dwa environment variable.

Turn on acceleration by setting the use_dwa environment variable: set environmentuse_dwa ’accelerate on’;.

Setting the use_dwa variable enables the Informix query optimizer to consider usingthe accelerator server to process the query when the optimizer generates the queryplans. For a complete list of the use_dwa environment variable options, see“use_dwa environment variable.”Related concepts:“Create a data mart” on page 5-5

use_dwa environment variableUse the use_dwa environment variable to control query acceleration and to set thedatabase client environment for Informix Warehouse Accelerator.

To set the use_dwa environment variable, you can run SQL statements from thedatabase client. Alternatively, you can add the SQL statements to the sysdbopen()stored procedure on the database server. Modify the sysdbopen() stored procedureonly if you want the use_dwa settings to apply to all sessions. If you specify theuse_dwa environment variable in the sysdbopen() stored procedure, you do notneed to modify your applications.

Syntax

�� SET ENVIRONMENT use_dwa �

� ' accelerate on 'session session_id off

fallback offon

probe startstop

debug onoff

online.logdebug file

file_nameprobe cleanup

��

© Copyright IBM Corp. 2010, 2012 6-1

Page 90: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 6-1. Keywords and variables in the use_dwa environment variable

Keyword and variable Purpose Restrictions

accelerate Controls query acceleration.By default, queries are notaccelerated.

accelerate on: Turns onacceleration. Queries thatmatch one of the acceleratedquery tables (AQTs) are sentto the accelerator server forprocessing. Use this settingto accelerate queries.

accelerate off: Turns offacceleration. Queries are notsent to the accelerator servereven if the queries meet therequired criteria.

fallback Controls what happens whenInformix WarehouseAccelerator cannot acceleratethe queries. For example, theaccelerator server is offline orthe queries do not match oneof the accelerated querytables (AQTs). The fallbackon option is the defaultsetting.

fallback off: If InformixWarehouse Acceleratorcannot accelerate the queries,the queries are not sent tothe Informix database serverfor processing. Use thefallback off option whenyou do not want subsequentqueries processed by theInformix database server.

fallback on: If InformixWarehouse Acceleratorcannot accelerate the queries,the queries are sent to theInformix database server forprocessing.

The fallback option appliesonly if you set theaccelerate on option.

6-2 IBM Informix Warehouse Accelerator Administration Guide

Page 91: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 6-1. Keywords and variables in the use_dwa environment variable (continued)

Keyword and variable Purpose Restrictions

probe Activates query probing.Query probing is gatheringinformation about a queryworkload. Query probing isused in workload analysis tocreate a data mart definition.The probe stop option is thedefault setting.

probe start: Activates queryprobing.

probe stop: Deactivatesquery probing.

debug Activates debugging. Thedebug off option is thedefault setting.

debug on: Turns ondebugging. The default logfile is the online.log file asspecified by the MSGPATHconfiguration parameter.

debug off: Turns offdebugging.

The debug option appliesonly if you set theaccelerate on option or theprobe start option.

debug filedebug file file_name

Sets a debug log file.

Use the file_name option tospecify a different log filethan the default online.logfile.

The default log file isspecified by the MSGPATHconfiguration parameter.

The debug on option isrequired for the debug fileoption to take effect.

If you specify a file name,use a path and file name thatdoes not have any specialcharacters, such as new lines,spaces, or tabs.

The value of file_name iscase-sensitive.

If you later specify the debugfile option without thefile_name, the debuggingoutput destination resets tothe default online.log file asspecified by the MSGPATHconfiguration parameter.

session session_id Sets the use_dwa environmentvariable settings for adifferent session as identifiedby the session_id number.

Use this option to change thesettings for a session thatoriginates from anapplication that opens theconnection to the databaseone time and does not closethe connection.

Only user informix canspecify the session option.

The SESSION ID must benumeric and must identifyan existing session.Important: Do not includethe session session_id optionin the sysdbopen() storedprocedure.

Chapter 6. Turning on query acceleration 6-3

Page 92: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table 6-1. Keywords and variables in the use_dwa environment variable (continued)

Keyword and variable Purpose Restrictions

probe cleanup The probe cleanup optionremoves all probing dataproduced by all past andcurrent sessions in thedatabase.

Usage

The SET ENVIRONMENT use_dwa statement takes one argument, which is astring value within single quotation marks. Keywords are not case-sensitive.

Examples

The following example turns on acceleration.set environment use_dwa ’accelerate on’;

The following example removes all the probing data that was previously collectedfor the current database.set environment use_dwa ’probe cleanup’;

The following example turns on acceleration and turns off fallback. The queries arenot sent to the Informix database server for processing. Queries that cannot beaccelerated by Informix Warehouse Accelerator will fail.set environment use_dwa ’accelerate on’;set environment use_dwa ’fallback off’;

The following example sets the debug option. By default, the debug information isappended to the online.log file.set environment use_dwa ’debug on’;

The following example creates probing data for your queries, turns on debugging,and appends the debugging information to a file named /tmp/my_debug_file.set environment use_dwa ’probe on’;set environment use_dwa ’debug on’;set environment use_dwa ’debug file /tmp/my_debug_file’;

The following example turns on debugging. The debug output of query 1 iswritten to the file /tmp/myDwaDebugFile. The debug output of query 2 is written tothe default online.log file.set environment use_dwa ’debug on’;set environment use_dwa ’debug file /tmp/myDwaDebugFile’;select ... { query 1 }set environment use_dwa ’debug file’;select ... { query 2 }

The following text shows example debug output. This output shows that a queryhas matched an AQT and is being sent to Informix Warehouse Accelerator forprocessing.15:00:35 SQDWA: select MIN(s_suppkey) from partsupp x0 left join supplier x1on x0.ps_15:00:35 SQDWA: Identified 1 candidate AQTs for matching15:00:35 SQDWA: matched: aqt48a93f10-d192-404f-8911-e01d67aadde2

6-4 IBM Informix Warehouse Accelerator Administration Guide

Page 93: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

15:00:35 SQDWA: matching successful (0 msec) aqt48a93f10-d192-404f-8911-e01d67aadde215:00:35 SQDWA: offloading successful (22 msec)

Related concepts:

Using SYSDBOPEN and SYSDBCLOSE Procedures (Guide to SQL: Syntax)Related reference:

MSGPATH configuration parameter (Administrator's Reference)

onstat -g ses command: Print session-related information (Administrator'sReference)

Chapter 6. Turning on query acceleration 6-5

Page 94: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

6-6 IBM Informix Warehouse Accelerator Administration Guide

Page 95: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 7. IBM Smart Analytics Optimizer Studio

Informix Warehouse Accelerator includes an Eclipse-based administration interface,IBM Smart Analytics Optimizer Studio. You can use Smart Analytics OptimizerStudio to perform administration task for Informix Warehouse Accelerator. Theadministration tasks are performed using a set of stored procedures in the Informixdatabase server.

Interface elements of IBM Smart Analytics Optimizer StudioHere is a brief description of the interface elements that show IBM Smart AnalyticsOptimizer Studio functionality.

Overview

The Properties view at the bottom shows the General page of the data mart that isdisplayed on the canvas. In this context, the General page gives you access to thefollowing buttons:

Set DatabaseOpens the Select Connection window, in which you can select anotherdatabase connection profile for the selected data mart. The changeassociates the data mart with another database and thus provides adifferent set of source tables and schemas for the data mart.

The showsaccelerator projects and data marts.

Data Project Explorer

From the menu you canvalidate and deploy a data mart.

Data Mart

The provides tools to addtables and create referencesbetween tables.

Palette

You can open a diagram of a datamart on the to add tablesand create references.

Canvas

The view showsproperties of the selected item.

Properties

The showsdatabase connections and deployeddata marts.

Data Source Explorer

Figure 7-1. Overview of IBM Smart Analytics Optimizer Studio opened in the Dataperspective

© Copyright IBM Corp. 2010, 2012 7-1

Page 96: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Refresh Database CacheUses the database catalog to refresh the list of tables and their size in thecache.

ValidateValidates the structural and referential integrity of the data mart that iscurrently displayed on the canvas.

DeployDeploys the data mart that is currently displayed on the canvas.

Menu barThe menu bar includes some standard menu choices in the Data perspective. Someof those menu choices might have a different effect when an Eclipse-based product,such as IBM Smart Analytics Optimizer Studio, is loaded. Additional menuchoices, that are specific to the Eclipse-based product, can also appear on the menubar.

The menus for IBM Smart Analytics Optimizer Studio are:

File > New > Accelerator ProjectStarts a wizard to create an accelerator project in your Eclipse workspace.

File > New > Data MartStarts a wizard to create a data mart in the selected accelerator project.

File > Import > Data > Data Mart ImportStarts a wizard to import a data mart definition file (xml file) into theselected accelerator project. This function is useful, for example, if youhave a working data mart in a test system and now want to use that datamart in a production system. An import results in a new data mart that isadded to the Data Project Explorer window. It does not modify a data martthat is open for editing.

File > Export > Data > Data Mart ExportStarts a wizard to save the definition of the selected data mart to an XMLfile in a local or remote file system. This function is useful to:v Import data mart definitions into other accelerator projectsv Back up data mart definitionsv Reuse data mart definitions in other applicationsv Edit a data mart definition with an external application, such as an XML

editor

Edit > Select AllSelects all elements in the currently active view. This menu choice isavailable when the focus is on the canvas.

Diagram > ValidateChecks the correctness and the structural integrity of the data mart on thecanvas. This menu choice is available when the focus is on the canvas oron the palette.

Diagram > SelectOpens a submenu that allows you to select:

All All objects in the data mart diagram on the canvas

All ShapesAll tables in the data mart diagram on the canvas

7-2 IBM Informix Warehouse Accelerator Administration Guide

Page 97: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

All ConnectionsAll references in the data mart diagram on the canvas

Diagram > ArrangeOpens a submenu that allows you to organize the objects in the data martdiagram on the canvas so that the canvas space is used efficiently andobjects do not overlap. The submenu offers the following choices:

All To arrange all the objects in the diagram in the described manner

SelectionTo arrange just the selected objects in the described manner

Diagram > AlignOpens a submenu that allows you to align selected tables on the canvaswith the position of the table that was selected last. The submenu offersthe following choices:

Align LeftTo make the left borders of all selected tables align vertically.

Align CenterTo make the centers of all selected tables align vertically.

Align RightTo make the right borders of all selected tables align vertically.

Align TopTo make the top borders of all selected tables align horizontally.

Align MiddleTo make the centers of all selected tables align horizontally.

Align BottomTo make the bottom lines of all selected tables align horizontally.

Diagram > ZoomOpens a submenu that allows you change the size of the diagram (theobjects) on the canvas. The submenu offers the following choices:

Zoom InTo enlarge the objects currently in the center of the canvas. Thismeans that objects in the center become bigger while objects closerto the edges fade out of view.

Zoom OutTo make the objects currently in the center of the canvas smaller.This means that objects in the center become smaller while objectscloser to the edges fade into view.

Zoom to 100%Restores the original or default size of objects on the canvas.

Zoom to FitAdjusts the size of the diagram on the canvas so that no object ishidden from view.

Fit to WidthMakes the leftmost object and the rightmost object align with theleft and right edges of the canvas frame so that both become fullyvisible within that distance.

Chapter 7. IBM Smart Analytics Optimizer Studio 7-3

Page 98: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Fit to HeightMakes the topmost object and the lowest object align with the topedge and the bottom line of the canvas frame so that both becomefully visible within that distance.

Fit to SelectionAdjusts the size of the selected object or group of objects andmoves it to the center so that it occupies a maximum of the visiblecanvas space. All surrounding objects fade out of view.

Tip: You can also select a fix diagram size in percent from a drop-downlist on the toolbar.

Data MartFrom this menu you can select the following choices:

Set DatabaseAssociates a database connection with the open data mart.

Refresh Database CacheUses the database catalog to refresh the list of tables and their sizein the cache.

ValidateTo validate the data mart that is currently loaded in IBM SmartAnalytics Optimizer Studio.

DeployTo deploy the data mart that is currently loaded in IBM SmartAnalytics Optimizer Studio.

Window > Open Perspective > Other > DataOpens the Data perspective, which shows IBM Smart Analytics OptimizerStudio (if it has been installed).

Window > Reset PerspectiveRestores all default views of IBM Smart Analytics Optimizer Studio to theirdefault size and position in the IBM Data Studio main window.

Window > Show ViewOpens a submenu that allows you to reopen a currently closed IBM SmartAnalytics Optimizer Studio view.

Note: If you close the canvas, you cannot reopen it from this menu. To doso, you need to double-click the corresponding data mart in the DataProject Explorer window.

Help > Welcome > Overview > IBM Smart Analytics Optimizer Studio foraccelerator

Opens the Description of tasks topic in the online help system.

Help > Welcome > What's New > IBM Smart Analytics Optimizer Studio foraccelerator

Opens the Description of tasks topic in the online help system.

Help > Welcome > Tutorials > IBM Smart Analytics Optimizer Studio foraccelerator

Opens the Cheat Sheets view to display the Getting Started guide.

Help > Cheat Sheets > Overview > IBM Smart Analytics Optimizer Studio foraccelerator

Opens the Cheat Sheets view to display the Getting Started guide.

7-4 IBM Informix Warehouse Accelerator Administration Guide

Page 99: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

ToolbarIBM Smart Analytics Optimizer Studio includes toolbar buttons for deploying andvalidating a data mart.

Toolbar button for changing the database connection.

Toolbar button for refreshing the database cache.

Toolbar button for validating a data mart.

Toolbar button for deploying a data mart.

Data Source Explorer windowThe Data Source Explorer window shows your database connection profiles andvarious objects like schemas, tables, and stored procedures that are defined in thedatabase catalogs of your data servers.

If IBM Smart Analytics Optimizer Studio has been installed and an accelerator hasbeen configured, the Data Source Explorer window also shows the accelerator andthe deployed data marts.

Menus

Depending on your selection in the Data Source Explorer, the menu (right-clickaction) offers the following menu choices specific to accelerator:

Database ConnectionsWhen you right-click the Database Connections node, you can select Newfrom the menu to start the New Connection wizard. This wizard allowsyou to specify the details for a database connection profile. Such a profileenables you to access a database from which to read table and schemainformation. This information is required for the creation of data marts.

An existing database connection profileWhen you right-click an existing database connection profile, you canselect the following from the menu:

ConnectConnects to the database that is referred to in the profile. You areasked for the password of the logon user if the option Savepassword is not selected in the profile.

DisconnectDisconnects an active database connection.

Ping Issues a ping command to check whether the network connectionto the database server works.

PropertiesOpens the Properties sheet of the existing profile so that you canedit it.

Chapter 7. IBM Smart Analytics Optimizer Studio 7-5

Page 100: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

AcceleratorsWhen the accelerator has been installed, configured, and deployed, theData Source Explorer window displays an Accelerators node. Allaccelerators are listed under this node.

When you right-click the accelerators node, you can select NewAccelerator from the menu. This menu choice enables you to associate anaccelerator with a data server. In the window that opens, you specify a4-digit code, an IP-address, and a port number. The system, in return,generates an authentication token that mutually authenticates the dataserver and the accelerator. If you choose to create a virtual accelerator, youonly have to provide a name for the accelerator.

An existing acceleratorWhen you right-click the node of an existing accelerator, you can selectbetween the following choices on the menu:

Start Activates the selected accelerator

Stop Deactivates the selected accelerator

Deploy Data MartOpens the Deploy Data Mart window, in which you can specifythe data mart to be deployed and select the accelerator to deploythe data mart to. To specify the data mart, you can select a datamart from an accelerator project or an xml file containing a datamart definition.

Deploy Software VersionTransfers updated accelerator software from Informix to theaccelerator and installs it.

Manage Software VersionOpens a window in which you can activate one of the softwareversions that are installed on the accelerator.

Configure TraceOpens the Configure Trace window, in which you can select traceprofiles for accelerators and stored procedures.

Save TraceThe Save Trace function saves the collected trace information. Inthe Save Trace window, which opens before the action iscompleted, you can specify or change the settings for this action.The Save Trace window provides a Clear Trace option. Whenselected, all previously collected trace information is deleted beforethe newly gathered information is saved. This prevents thetrace-file size from growing too big.

Change Authentication TokenRenews the authentication token that is used to authenticate thedatabase server and the accelerator, and updates the connectioninformation (number of coordinator nodes and their IP addresses)in the database server catalog. For example, if you have addedprocessing nodes to the accelerator, this function corrects thenumber of registered coordinator nodes on the database server.

RemoveRemoves the currently selected accelerator from the subsystem(configuration) of your database management system.

7-6 IBM Informix Warehouse Accelerator Administration Guide

Page 101: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

RefreshRetrieves the most recent status information and updates the list ofdata marts that are deployed on the selected accelerator.

An existing data martWhen you right-click an existing data mart in the Data Source Explorerwindow, you can select from the following menu choices:

EnableTo enable query acceleration for the selected data mart.

DisableTo disable query acceleration for the selected data mart.

Open To display the diagram of the selected data mart on the canvas.When you select this menu choice, the data mart is copied to yourEclipse workspace. The diagram shows the tables and references ofthis local copy.

Drop To remove the selected data mart from the accelerator machine.

Load To immediately load the selected data mart. A load operationpopulates an empty data mart with data or replaces the existingdata in the data mart.

Note: During an immediate load, you cannot close IBM SmartAnalytics Optimizer Studio because this is a synchronous task,meaning that the network connection must stay intact until theprocess has finished.

RefreshRetrieves the latest status information about the selected data martfrom the accelerator.

Properties view

Depending on the object that is selected in the Data Source Explorer window, theinformation and controls in the Properties view change:

AcceleratorsWhen the Accelerators node is selected, the currently configuredaccelerators are listed on the General page of the Properties view. Youselect an accelerator in this list to activate the buttons for this particularaccelerator. You can also click the Add button to deploy a new acceleratorthat is not yet listed in the Data Source Explorer window.

An acceleratorSelecting an accelerator that is listed under Accelerators results in thefollowing pages being displayed in the Properties view:

GeneralThis page contains general information about the accelerator, theprocessing nodes, the request status, and provides buttons to dothe following:v Start the acceleratorv Stop the acceleratorv Configure tracing for the acceleratorv Save trace information from this acceleratorv Change the authentication token

Chapter 7. IBM Smart Analytics Optimizer Studio 7-7

Page 102: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Data MartsThis page lists the data marts that are assigned to the selectedaccelerator. Selecting a data mart in the list activates the buttonsfor this particular data mart; the buttons allow you to:v Open the data mart (display the diagram on the canvas, where

you can edit it)v Enable the data mart for query accelerationv Disable query acceleration for the data martv Deploy a new data martv Drop the data mart (delete the data mart from the accelerator).v Load or schedule load operations for the data mart

SoftwareThis page lists the software versions that are installed on theaccelerator in a table. It also provides buttons that enable you todeploy new software versions to an accelerator (that is, copy therelevant files from your data server to an accelerator), displaydetails or activate the version that is selected in the table.

A data martSelecting a data mart that is listed under an accelerator results in thefollowing pages being displayed in the Properties view:

GeneralThis page contains general information about the data mart andprovides buttons to do the following:v Open the data mart (display the diagram on the canvas, where

you can edit it)v Enable the data mart for query accelerationv Disable query acceleration for the data mart

Catalog ObjectsProvides a button that allows you to view the SQL code of theaccelerator catalog objects associated with the data mart. Thecatalog objects are stored on the database server.

Data Project Explorer windowThe Data Project Explorer window lists your accelerator projects. When youexpand the node that represents an accelerator project, the data marts that aredefined in that project come into view.

Menus

When you right-click on a object in theData Project Explorer window, the menuthat appears depend on the object that you selected:

An accelerator projectWhen you right-click an accelerator project, the following choices areavailable from the menu:

New Opens a submenu, from which you can select:

Accelerator ProjectTo create another accelerator project

Data MartTo create a data mart in the selected accelerator project

File > Import > Data > Data Mart ImportStarts a wizard to import a data mart definition file (xml file) into

7-8 IBM Informix Warehouse Accelerator Administration Guide

Page 103: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

the selected accelerator project. This function is useful, for example,if you have a working data mart in a test system and want to usethat data mart in a production system. An import results in a newdata mart that is added to the Data Project Explorer window. Animport does not modify a data mart that you are editing.

File > Export > Data > Data Mart ExportStarts a wizard to save the data mart definition of the selected datamart to an XML file in a local or remote file system. This functionis useful to:v Import data mart definitions into other accelerator projectsv Back up data mart definitionsv Reuse data mart definitions in other applicationsv Edit a data mart definition with an external application, such as

an XML editor

ValidateTo validate the structural and referential integrity of the selecteddata mart.

Data MartsWhen you right-click on the Data Marts folder, the following choices areavailable from the menu:

New Data MartTo create a data mart in the current accelerator project.

File > Import > Data > Data Mart ImportStarts a wizard to import a data mart definition file (xml file) intothe selected accelerator project. This function is useful, for example,if you have a working data mart in a test system and want to usethat data mart in a production system. An import results in a newdata mart that is added to the Data Project Explorer window. Animport does not modify a data mart that you are editing.

File > Export > Data > Data Mart ExportStarts a wizard to save the data mart definition of the selected datamart to an XML file in a local or remote file system. This functionis useful to:v Import data mart definitions into other accelerator projectsv Back up data mart definitionsv Reuse data mart definitions in other applicationsv Edit a data mart definition with an external application, such as

an XML editor

An existing data martWhen you right-click an existing data mart, the following choices areavailable from the menu:

New Opens a submenu, from which you can select:

Accelerator ProjectTo create another accelerator project

Data MartTo create a data mart in the selected accelerator project

Set DatabaseOpens the Select Connection window, in which you can select

Chapter 7. IBM Smart Analytics Optimizer Studio 7-9

Page 104: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

another database connection profile for the selected data mart.Changing the connection profile associates the data mart withanother database, which provides a different set of source tablesand schemas for the data mart.

Deploy Data MartOpens the Deploy Data Mart window, in which you can choose theaccelerator to deploy the selected data mart to.

Refresh Database CacheUses the database catalog to refresh the list of tables and their sizein the cache.

ValidateValidates the structural and referential integrity of the data martthat is currently displayed on the canvas.

Save As ImageGenerates an image that displays the graphical view of the datamart and saves it to a file.

Generate ReportGenerate an HTML report of the data mart including details aboutthe data mart and the image.

File > Import > Data > Data Mart ImportStarts a wizard to import a data mart definition file (xml file) intothe selected accelerator project. This function is useful, for example,if you have a working data mart in a test system and want to usethat data mart in a production system. An import results in a newdata mart that is added to the Data Project Explorer window. Animport does not modify a data mart that you are editing.

File > Export > Data > Data Mart ExportStarts a wizard to save the data mart definition of the selected datamart to an XML file in a local or remote file system. This functionis useful to:v Import data mart definitions into other accelerator projectsv Back up data mart definitionsv Reuse data mart definitions in other applicationsv Edit a data mart definition with an external application, such as

an XML editor

Data mart editorThe data mart editor consists of the canvas and the Palette. You can open multipleeditors at the same time to display multiple data marts.

A canvas page is added for each additional data mart. You can bring a page intoview by clicking the appropriate tab on top of the page. The Outline andProperties views always refer to the data mart or page that is in front and has thefocus.

CanvasThe canvas is a single window that is usually located in the middle of the Dataperspective. The canvas is used to display diagrams of your data marts.

You can create and edit data marts by adding and manipulating the graphicalobjects belonging to the diagram on the canvas.

7-10 IBM Informix Warehouse Accelerator Administration Guide

Page 105: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

When a data mart diagram is displayed on the canvas, and the canvas is the activewindow, the Properties view shows pages that are related to the object that isselected on the canvas.

When the entire data mart is selected (click once on the background of the canvasto do this), the following pages are displayed in the Properties view:

GeneralThis page shows the name of the data mart on the canvas, the name of theassociated database, and the estimated size of the data mart. It alsoprovides buttons to:v Set the database for the selected data mart (change the source location)v Deploy the data martv Validate the data martv Refresh the database cache

Tables This page lists the tables that are used in the data mart and shows theirestimated sizes. There are also buttons to add and remove tables from thedata mart.

ValidationThis page shows just the errors in the data mart that is currently displayedon the canvas. The same errors are also listed in the Problems view. Thepurpose of the Validation page is to isolate the data mart errors, so thatyou do not need to identify them among all the others in the Problemsview.

Space RequiredThis page gives you an estimated size of the data mart that is currentlydisplayed on the canvas. The size displayed is the total estimatedcompressed size in the combined main memory of all accelerator servernodes. The actual size that is required after loading might differ from theestimate because it depends on the actual column cardinalities and thevalue frequency distribution.

PaletteThe Palette is a toolbox for the canvas.

The Palette for IBM Smart Analytics Optimizer Studio includes the followingbuttons:

Selects objects on the canvas (default).

Enlarges the objects on the canvas.

Makes the objects on the canvas smaller.

Changes the fourth button on the upper toolbar of the Palette.

Adds a text box to the diagram on the canvas, in which you can type notesor comments. The text box looks like a yellow note sticker to make it moreprominent.

Adds a text box to the diagram on the canvas, in which you can type

Chapter 7. IBM Smart Analytics Optimizer Studio 7-11

Page 106: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

labels or descriptions. Unlike the note or note attachment text box, this textbox does not have a background or frame in a different color.

Adds a text box to the diagram on the canvas, in which you can type notesor comments. A thin line connects the text box to a previously selectedobject in the diagram. After clicking the icon, you can select the object, forexample a table, and, while holding down the mouse button, drag a lineanywhere on the canvas. When you release the mouse button, the text boxappears. The text box looks like a yellow note sticker to make it moreprominent.

Note: To create a line break in the text boxes of notes ( ), texts ( ),

and note attachments ( ), you must press CTRL+ENTER, not just theENTER key.

Adds a table to the data mart on the canvas. You can use the followingmethods to add a table:v Click the table icon once, then click the white background of the canvasv Drag and drop the table icon on the canvasv Double-click the table icon

Creates a 1:n reference between tables on the canvas. You can use thefollowing methods to add a reference:v Click the reference icon on the palette to activate the reference toolv Click the mouse button on the parent table of the new reference (usually

the dimension table of a join), hold the mouse button down, and dragthe mouse to the child table of the reference (usually the fact table of ajoin), then release the mouse button over the child table. The AddReference wizard opens.

Create an n:m reference between tables on the canvas.

Outline viewThe Outline view offers two different representations of the data mart on thecanvas.

Depending on the button that is clicked on its toolbar, the Outline view shows oneof the following:

A hierarchical list (tree view) of all the tables in the data mart on thecanvas

A bird's-eye-view of the canvas, which allows you to see the full extent ofthe currently displayed data-mart diagram with minimal scrolling effort

7-12 IBM Informix Warehouse Accelerator Administration Guide

Page 107: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Hierarchical list (tree view)

When the Outline view shows a hierarchical list (tree view) of a data-mart diagramand is the active window, the Properties view shows the property pages for theobject that is selected in the Outline view.

If you select the root node of the hierarchical list, which represents the entire datamart, the following pages are displayed in the Properties view:

GeneralThis page shows the name of the data mart on the canvas, the name of theassociated database, and the estimated size of the data mart. It alsoprovides buttons to:v Set the database for the selected data mart (change the source location)v Deploy the data martv Validate the data martv Refresh the database cache

Tables This page lists the tables that are used in the data mart and shows theirestimated sizes. There are also buttons to add and remove tables from thedata mart.

ValidationThis page shows just the errors in the data mart that is currently displayedon the canvas. The same errors are also listed in the Problems view. Thepurpose of the Validation page is to isolate the data mart errors, so thatyou do not need to identify them among all the others in the Problemsview.

Space RequiredThis page gives you an estimated size of the data mart that is currentlydisplayed on the canvas. The size displayed is the total estimatedcompressed size in the combined main memory of all accelerator servernodes. The actual size that is required after loading might differ from theestimate because it depends on the actual column cardinalities and thevalue frequency distribution.

If you select an item in the hierarchical list that represents a table, the Propertiesview shows the following pages:

GeneralThis page displays the name and the schema name of the selected table. Italso gives you access to the Fact table check box and related radio buttons.Using these controls, you can select the method by which it is determinedwhether the selected table is a fact table.

ColumnsThis page lists the columns in the selected tables. There are check boxes infront of the column names so that you can exclude and include columns.This determines which queries can run at an accelerated pace (queriesagainst an excluded column are not accelerated because the data will notbe present in the data mart after the data mart has been deployed to anaccelerator). Selecting just a subset of the available columns of a table alsoreduces the data mart size.

RelationshipsThis page lists the references between the selected tables and gives youaccess to several function buttons.

Chapter 7. IBM Smart Analytics Optimizer Studio 7-13

Page 108: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Space RequiredThis page gives you the estimated size of the selected table and informsyou about its role in the references that it participates in. In addition, thepage gives you the memory space that will be required when a table join,as defined by a reference, takes place. For example:Estimated size of this table: 3 KBTable is parent in a run-time join = 3.0 KB

Bird's-eye-view (data-mart diagram)

When the Outline view shows a data-mart diagram (bird's-eye-view) and the entiredata mart is selected on the canvas, the Properties view shows the same pages asthe hierarchical list. When just a table is selected on the canvas, no Propertiespages are shown. To select an entire data mart, click once on the white space of thecanvas.

Properties viewThe Properties view by default appears in the tabbed notebook at the bottom ofthe Data perspective and displays one or multiple nested pages (tabs) that provideadditional details about the selected item. The number of pages and the contentshown on each page of the Properties view depends on the selected item or theactive view in the Data perspective.

The following views or selections in these views cause the content of the Propertiesview to change:v Canvasv Outline viewv Data Project Explorerv Data Source Explorer

Tip: To activate the Properties view of an entire data mart, click the background ofthe canvas or select the root node in the hierarchical mode (tree view) of theOutline view.

7-14 IBM Informix Warehouse Accelerator Administration Guide

Page 109: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 8. Reversion requirements for an Informix warehouseedition server and Informix Warehouse Accelerator

If you need to revert from the IBM Informix 11.70 server to an earlier version, thereare some reversion tasks you need to perform.

Reversion of the database server that contains data marts thatwere created with Informix Warehouse Accelerator

Before you use the onmode -b command to revert the database server, you mustdrop all of the data marts associated with that database server. You can drop thedata marts by using the IBM Smart Analytics Optimizer Studio, or by using thecommand line interface.

If you do not drop the data marts and the reversion succeeds, the system databasesmight be rebuilt and the AQTs will disappear. As a result, the data martsassociated with the reverted databases are orphaned and consume space andmemory.

Reversion of the database server that performed workloadanalysis to create data mart definitions

If you created the data mart definitions using workload analysis, the tables that arecreated by the probe2mart stored procedure must be dropped before starting thereversion:v If you created a separate logging database to use with the probe2mart stored

procedure, all of the data mart definition information will be in tables in thatseparate database. You can simply drop that database without impacting yourother databases.

v If you used your warehousing database as the logging database with theprobe2mart stored procedure, you must manually drop each of the permanenttables that were created by the probe2mart stored procedure.

If you do not drop the tables before you start reversion, the reversion will fail.Related reference:“The probe2mart stored procedure” on page 5-14

© Copyright IBM Corp. 2010, 2012 8-1

Page 110: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

8-2 IBM Informix Warehouse Accelerator Administration Guide

Page 111: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Chapter 9. Troubleshooting

Missing sbspaceIf you do not have a default sbspace created in the Informix database server andyou attempt to install Informix Warehouse Accelerator, an error is returned.

You must create and configure a default sbspace in the Informix database server,set the name of the default sbspace in the SBSPACENAME configurationparameter, and restart the Informix database server.Related tasks:“Preparing the Informix database server” on page 2-3

Ensuring a result set includes the most current dataOccasionally you want a specific query to access the most current data, which isstored on the database server. You can turn off acceleration temporarily to run thequery.

The data that is stored on the accelerator server is a snap-shot of the data on thedatabase server. If you need to ensure that a query result set includes the mostcurrent data, turn off acceleration, run the query, and turn on acceleration again:1. Specify the SET ENVIRONMENT use_dwa ’accelerate off’ statement at the

beginning of the query to turn off acceleration. Setting this variable ensures thatthe query is processed by the Informix database server and not processed bythe accelerator server.

2. Add the statement SET ENVIRONMENT use_dwa ’accelerate on’ at the end of thequery to activate acceleration again.

3. Run the query.

© Copyright IBM Corp. 2010, 2012 9-1

Page 112: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

9-2 IBM Informix Warehouse Accelerator Administration Guide

Page 113: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Appendix A. Sample warehouse schema

The Informix Warehouse Accelerator examples use this sample warehouse schema.

SQL statements

The following SQL statements create the tables, indexes, and key constraints for thesample warehouse schema.CREATE TABLE DAILY_FORECAST (

PERKEY INTEGER NOT NULL ,STOREKEY INTEGER NOT NULL ,PRODKEY INTEGER NOT NULL ,QUANTITY_FORECAST INTEGER ,EXTENDED_PRICE_FORECAST DECIMAL(16,2) ,EXTENDED_COST_FORECAST DECIMAL(16,2) );

CREATE TABLE DAILY_SALES (PERKEY INTEGER NOT NULL ,STOREKEY INTEGER NOT NULL ,CUSTKEY INTEGER NOT NULL ,PRODKEY INTEGER NOT NULL ,PROMOKEY INTEGER NOT NULL ,QUANTITY_SOLD INTEGER ,EXTENDED_PRICE DECIMAL(16,2) ,EXTENDED_COST DECIMAL(16,2) ,SHELF_LOCATION INTEGER ,SHELF_NUMBER INTEGER ,START_SHELF_DATE INTEGER ,SHELF_HEIGHT INTEGER ,SHELF_WIDTH INTEGER ,SHELF_DEPTH INTEGER ,SHELF_COST DECIMAL(16,2) ,SHELF_COST_PCT_OF_SALE DECIMAL(16,2) ,BIN_NUMBER INTEGER ,PRODUCT_PER_BIN INTEGER ,START_BIN_DATE INTEGER ,BIN_HEIGHT INTEGER ,BIN_WIDTH INTEGER ,BIN_DEPTH INTEGER ,BIN_COST DECIMAL(16,2) ,BIN_COST_PCT_OF_SALE DECIMAL(16,2) ,TRANS_NUMBER INTEGER ,HANDLING_CHARGE INTEGER ,UPC INTEGER ,SHIPPING INTEGER ,TAX INTEGER ,PERCENT_DISCOUNT INTEGER ,TOTAL_DISPLAY_COST DECIMAL(16,2) ,TOTAL_DISCOUNT DECIMAL(16,2) ) ;

CREATE TABLE CUSTOMER (CUSTKEY INTEGER NOT NULL ,NAME CHAR(30) ,ADDRESS CHAR(40) ,C_CITY CHAR(20) ,C_STATE CHAR(5) ,ZIP CHAR(5) ,PHONE CHAR(10) ,AGE_LEVEL SMALLINT ,AGE_LEVEL_DESC CHAR(20) ,INCOME_LEVEL SMALLINT ,

© Copyright IBM Corp. 2010, 2012 A-1

Page 114: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

INCOME_LEVEL_DESC CHAR(20) ,MARITAL_STATUS CHAR(1) ,GENDER CHAR(1) ,DISCOUNT DECIMAL(16,2) ) ;

ALTER TABLE CUSTOMERADD CONSTRAINT PRIMARY KEY( CUSTKEY );

CREATE TABLE PERIOD (PERKEY INTEGER NOT NULL ,CALENDAR_DATE DATE ,DAY_OF_WEEK SMALLINT ,WEEK SMALLINT ,PERIOD SMALLINT ,YEAR SMALLINT ,HOLIDAY_FLAG CHAR(1) ,WEEK_ENDING_DATE DATE ,MONTH CHAR(3) ) ;

ALTER TABLE PERIODADD CONSTRAINT PRIMARY KEY( PERKEY );

CREATE UNIQUE INDEX PERX1 ON PERIOD( CALENDAR_DATE ASC,PERKEY ASC );

CREATE UNIQUE INDEX PERX2 ON PERIOD( WEEK_ENDING_DATE ASC,

PERKEY ASC );

CREATE TABLE PRODUCT (PRODKEY INTEGER NOT NULL ,UPC_NUMBER CHAR(11) NOT NULL ,PACKAGE_TYPE CHAR(20) ,FLAVOR CHAR(20) ,FORM CHAR(20) ,CATEGORY INTEGER ,SUB_CATEGORY INTEGER ,CASE_PACK INTEGER ,PACKAGE_SIZE CHAR(6) ,ITEM_DESC CHAR(30) ,P_PRICE DECIMAL(16,2) ,CATEGORY_DESC CHAR(30) ,P_COST DECIMAL(16,2) ,SUB_CATEGORY_DESC CHAR(70) ) ;

ALTER TABLE PRODUCTADD CONSTRAINT PRIMARY KEY( PRODKEY );

CREATE UNIQUE INDEX PRODX2 ON PRODUCT( CATEGORY ASC,

PRODKEY ASC );

CREATE UNIQUE INDEX PRODX3 ON PRODUCT( CATEGORY_DESC ASC,

PRODKEY ASC );

CREATE TABLE PROMOTION (PROMOKEY INTEGER NOT NULL ,PROMOTYPE INTEGER ,PROMODESC CHAR(30) ,PROMOVALUE DECIMAL(16,2) ,PROMOVALUE2 DECIMAL(16,2) ,

A-2 IBM Informix Warehouse Accelerator Administration Guide

Page 115: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

PROMO_COST DECIMAL(16,2) ) ;

ALTER TABLE PROMOTIONADD CONSTRAINT PRIMARY KEY( PROMOKEY );

CREATE UNIQUE INDEX PROMOX1 ON PROMOTION( PROMODESC ASC,

PROMOKEY ASC);

CREATE TABLE STORE (STOREKEY INTEGER NOT NULL ,STORE_NUMBER CHAR(2) ,CITY CHAR(20) ,STATE CHAR(5) ,DISTRICT CHAR(14) ,REGION CHAR(10) ) ;

ALTER TABLE STOREADD CONSTRAINT PRIMARY KEY( STOREKEY );

CREATE INDEX DFX1 ON DAILY_FORECAST ( PERKEY ASC);

CREATE INDEX DFX2 ON DAILY_FORECAST ( STOREKEY ASC);

CREATE INDEX DFX3 ON DAILY_FORECAST ( PRODKEY ASC);

CREATE INDEX DSX1 ON DAILY_SALES ( PERKEY ASC);

CREATE INDEX DSX2 ON DAILY_SALES ( STOREKEY ASC);

CREATE INDEX DSX3 ON DAILY_SALES ( CUSTKEY ASC);

CREATE INDEX DSX4 ON DAILY_SALES ( PRODKEY ASC);

CREATE INDEX DSX5 ON DAILY_SALES ( PROMOKEY ASC);

ALTER TABLE daily_sales ADD CONSTRAINT FOREIGN KEY (perkey)references period(perkey);

ALTER TABLE daily_sales ADD CONSTRAINT FOREIGN KEY (prodkey)references product(prodkey);

ALTER TABLE daily_sales ADD CONSTRAINT FOREIGN KEY(storekey) references store(storekey);

ALTER TABLE daily_sales ADD CONSTRAINT FOREIGN KEY (custkey)references customer(custkey);

ALTER TABLE daily_sales ADD CONSTRAINT FOREIGN KEY (promokey)references promotion(promokey);

ALTER TABLE daily_forecast ADD CONSTRAINT FOREIGN KEY (perkey)references period(perkey);

ALTER TABLE daily_forecast ADD CONSTRAINT FOREIGN KEY (prodkey)references product(prodkey);

ALTER TABLE daily_forecast ADD CONSTRAINT FOREIGN KEY (storekey)references store(storekey);

update statistics medium;

Appendix A. Sample warehouse schema A-3

Page 116: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

A-4 IBM Informix Warehouse Accelerator Administration Guide

Page 117: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Appendix B. Sysmaster interface (SMI) pseudo tables forquery probing data

The SMI tables provide a way to access probing data in a relational form, which ismost convenient for further processing.

The sysmaster database provides the following pseudo tables for accessing probingdata:v For tables: sysprobetablesv For columns: sysprobecolumnsv For join descriptors: sysprobejdsv For join predicates: sysprobejps

The sysprobetables table

The schema for the sysprobetables table is:CREATE TABLE informix.sysprobetables(dbname char(128), { database name }sql_id int8, { statement id in syssqltrace }tabid integer, { table id }fact char(1) { table is fact table (y/n) });REVOKE ALL ON informix.sysprobetables FROM public AS informix;GRANT SELECT ON informix.sysprobetables TO public as informix;

The sysprobecolumns table

The schema for the sysprobecolumns table is:CREATE TABLE informix.sysprobecolumns(dbname char(128), { database name }sql_id int8, { statement id in syssqltrace }tabid integer, { table id }colno smallint { column number });REVOKE ALL ON informix.sysprobecolumns FROM public AS informix;GRANT SELECT ON informix.sysprobecolumns TO public AS informix;

The sysprobejds table

The schema for the sysprobejds table is:CREATE TABLE informix.sysprobejds(dbname char(128), { database name }sql_id int8, { statement id in syssqltrace }jd integer, { join descriptor sequence number }ctabid integer, { child table id }ptabid integer, { parent table id }type char(1), { join type: inner (i), left outer (l) }uniq char(1) { parent table has unique index (y/n) });REVOKE ALL ON informix.sysprobejds FROM public AS informix;GRANT SELECT ON informix.sysprobejds TO public AS informix;

© Copyright IBM Corp. 2010, 2012 B-1

Page 118: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

The sysprobejps table

The schema for the sysprobejps table:CREATE TABLE informix.sysprobejps(dbname char(128), { database name }sql_id int8, { statement id in syssqltrace }jd integer, { join descriptor sequence number }jp integer, { join predicate sequence number }ccolno smallint, { child table column number }pcolno smallint { parent table column number });REVOKE ALL ON informix.sysprobejps FROM public AS informix;GRANT SELECT ON informix.sysprobejps TO public AS informix;

Related tasks:“Creating data mart definitions by using workload analysis” on page 5-7

B-2 IBM Informix Warehouse Accelerator Administration Guide

Page 119: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Appendix C. Supported locales

Informix Warehouse Accelerator supports a subset of the locales that IBM Informixsupports.

Some of the locales are not supported by the JDBC environment that is needed torun administrative commands for the accelerator. For these locales you must mapthe locale to a different locale or code set name, only for the connection throughJDBC, for example in the Java connection URL. See User-defined locales (JDBCDriver Programmer's Guide) for information about how to map the locale in theJava connection URL.

Locale 8859-1 and 8859-15

The following table lists the supported locales:

Table C-1. Information for locales 8859-1 and 8859-15

Locale 8859-1 Locale 8859-15

da_dk.8859-1de_at.8859-1de_at.8859-1@bun1de_at.8859-1@bundde_at.8859-1@dud1de_at.8859-1@dudede_ch.8859-1de_ch.8859-1@bun1de_ch.8859-1@bundde_ch.8859-1@dudede_de.8859-1de_de.8859-1@bun1de_de.8859-1@bundde_de.8859-1@dud1de_de.8859-1@dudeen_au.8859-1en_gb.8859-1en_us.8859-1en_us.8859-1@dicten_us.8859-1@dresen_us.8859-1@extnes_es.8859-1es_es.8859-1@ra94es_es.8859-1@raefi_fi.8859-1fr_be.8859-1fr_ca.8859-1fr_ch.8859-1fr_fr.8859-1is_is.8859-1it_it.8859-1nl_be.8859-1nl_nl.8859-1no_no.8859-1pt_br.8859-1pt_pt.8859-1sv_se.8859-1

da_dk.8859-15de_at.8859-15de_at.8859-15@bun1de_at.8859-15@dud1de_ch.8859-15de_ch.8859-15@bun1de_ch.8859-15@dud1de_de.8859-15de_de.8859-15@bun1de_de.8859-15@dud1en_gb.8859-15en_us.8859-15en_us.8859-15@dictes_es.8859-15es_es.8859-15@raefi_fi.8859-15fr_be.8859-15fr_ch.8859-15fr_fr.8859-15it_it.8859-15nl_be.8859-15nl_nl.8859-15no_no.8859-15pt_pt.8859-15sv_se.8859-15

© Copyright IBM Corp. 2010, 2012 C-1

Page 120: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Locales 8859-2, 8859-5, and 8859-6

The following table lists the supported locales:

Table C-2. Information for locales 8859-2, 8859-5, and 8859-6

Locale 8859-2 Locale 8859-5 Locale 8859-6

cs_cz.8859-2cs_cz.8859-2@sishr_hr.8859-2hu_hu.8859-2pl_pl.8859-2ro_ro.8859-2sh_hr.8859-2

(Needs mapping tohr_hr.8859-2for Java/JDBC)

sk_sk.8859-2sk_sk.8859-2@sn

bg_bg.8859-5ru_ru.8859-5uk_ua.8859-5

The following locales aresupported if mapped to thear_ae.8859-6 locale for theJava/JDBC connection:ar_dz, ar_eg, ar_jo, ar_lb,ar_ma, ar_sy, ar_tn, andar_ye.ar_ae.8859-6ar_ae.8859-6@gregar_ae.8859-6@islaar_bh.8859-6ar_bh.8859-6@gregar_bh.8859-6@islaar_kw.8859-6ar_kw.8859-6@gregar_kw.8859-6@islaar_om.8859-6ar_om.8859-6@gregar_om.8859-6@islaar_qa.8859-6ar_qa.8859-6@gregar_qa.8859-6@islaar_sa.8859-6ar_sa.8859-6@gregar_sa.8859-6@islaar_dz.8859-6ar_eg.8859-6ar_jo.8859-6ar_lb.8859-6ar_ma.8859-6ar_sy.8859-6ar_tn.8859-6ar_ye.8859-6

Locales 8859-7, 8859-8, and 8859-9

The following table lists the supported locales:

Table C-3. Information for locales 8859-7, 8859-8, and 8859-9

Locale 8859-7 Locale 8859-8 Locale 8859-9

el_gr.8859-7 iw_il.8859-8iw_il.8859-8@gregiw_il.8859-8@hebr

tr_tr.8859-9@ifix

C-2 IBM Informix Warehouse Accelerator Administration Guide

Page 121: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Locales utf-8

The following table lists the supported locales:

Table C-4. Information for locales utf-8

Locale utf-8 (ar_ae - hu_hu) Locale utf8 (ja_jp - zh_tw)

ar_ae.utf8ar_bh.utf8ar_kw.utf8ar_om.utf8ar_qa.utf8ar_sa.utf8cs_cz.utf8da_dk.utf8de_at.utf8de_ch.utf8de_de.utf8en_au.utf8en_gb.utf8en_us.utf8es_es.utf8fi_fi.utf8fr_be.utf8fr_ca.utf8fr_ch.utf8fr_fr.utf8hr_hr.utf8hu_hu.utf8

ja_jp.utf8ko_kr.utf8nl_be.utf8nl_nl.utf8no_no.utf8pl_pl.utf8pt_br.utf8pt_pt.utf8ro_ro.utf8ru_ru.utf8sh_hr.utf8

(Needs mapping tohr_hr.utf8for Java/JDBC)

sk_sk.utf8sv_se.utf8th_th.utf8tr_tr.utf8tr_tr.utf8@ifixzh_cn.utf8zh_hk.utf8

(Needs mapping tozh_tw.utf8 for Java/JDBC)

zh_tw.utf8

Locales PC-Latin-1, PC-Latin-2, and 858

The PC-Latin codesets need to be replaced with the following codesets:v Replace PC-Latin-1 with 850

v Replace PC-Latin-2 with 852

v Replace PC-Latin-1 w_euro with 858

For the Java/JDBC connection, the codeset name 858 then needs to be mapped toLatin9.

Note: The sh_hr locale must be mapped to hr_hr for the Java/JDBC connection.

The following table lists the supported locales:

Appendix C. Supported locales C-3

Page 122: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Table C-5. Information for locales PC-Latin-1, PC-Latin-2, and 858

Locale PC-Latin-1 Locale PC-Latin-2 Locale 858

da_dk.PC-Latin-1de_at.PC-Latin-1de_at.PC-Latin-1@bundde_at.PC-Latin-1@dudede_ch.PC-Latin-1de_ch.PC-Latin-1@bundde_ch.PC-Latin-1@dudede_de.PC-Latin-1de_de.PC-Latin-1@bun1de_de.PC-Latin-1@bundde_de.PC-Latin-1@dud1de_de.PC-Latin-1@dudeen_au.PC-Latin-1en_gb.PC-Latin-1en_us.PC-Latin-1en_us.PC-Latin-1@dictes_es.PC-Latin-1es_es.PC-Latin-1@raefi_fi.PC-Latin-1fr_be.PC-Latin-1fr_ca.PC-Latin-1fr_ch.PC-Latin-1fr_fr.PC-Latin-1is_is.PC-Latin-1it_it.PC-Latin-1nl_be.PC-Latin-1nl_nl.PC-Latin-1no_no.PC-Latin-1pt_pt.PC-Latin-1sv_se.PC-Latin-1

cs_cz.PC-Latin-2hr_hr.PC-Latin-2hu_hu.PC-Latin-2pl_pl.PC-Latin-2ro_ro.PC-Latin-2sh_hr.PC-Latin-2sk_sk.PC-Latin-2

da_dk.858de_at.858de_at.858@bundde_at.858@dudede_de.858de_de.858@bun1de_de.858@bundde_de.858@dud1de_de.858@dudees_es.858fi_fi.858fr_be.858fr_fr.858it_it.858nl_be.858nl_nl.858pt_pt.858

C-4 IBM Informix Warehouse Accelerator Administration Guide

Page 123: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Locales CP1250, CP1251, CP1252, and CP1253

The following table lists the supported locales:

Table C-6. Information for locales CP1250, CP1251, CP1252, and CP1253

Locale CP1250 Locale CP1251 Locale CP1252 Locale CP1252 (cont.) Locale CP1253

cs_cz.CP1250hr_hr.CP1250hu_hu.CP1250pl_pl.CP1250ro_ro.CP1250sh_hr.CP1250

(Needs mapping tohr_hr.CP1250for Java/JDBC)

sk_sk.CP1250

bg_bg.1251ru_ru.1251uk_ua.1251

da_dk.CP1252da_dk.CP1252@eurode_at.CP1252de_at.CP1252@bun1de_at.CP1252@bundde_at.CP1252@dud1de_at.CP1252@dudede_at.CP1252@ebu1de_at.CP1252@edu1de_at.CP1252@eurode_ch.CP1252de_ch.CP1252@bun1de_ch.CP1252@bundde_ch.CP1252@dud1de_ch.CP1252@dudede_ch.CP1252@ebu1de_ch.CP1252@edu1de_ch.CP1252@eurode_de.CP1252de_de.CP1252@bun1de_de.CP1252@bundde_de.CP1252@dud1de_de.CP1252@dudede_de.CP1252@ebu1de_de.CP1252@edu1de_de.CP1252@euroen_au.CP1252en_gb.CP1252en_gb.CP1252@euroen_us.CP1252

en_us.CP1252@dicten_us.CP1252@edicen_us.CP1252@euroes_es.CP1252es_es.CP1252@euroes_es.CP1252@raefi_fi.CP1252fi_fi.CP1252@eurofr_be.CP1252fr_be.CP1252@eurofr_ca.CP1252fr_ch.CP1252fr_ch.CP1252@eurofr_fr.CP1252fr_fr.CP1252@eurois_is.CP1252it_it.CP1252it_it.CP1252@euronl_be.CP1252nl_be.CP1252@euronl_nl.CP1252nl_nl.CP1252@eurono_no.CP1252no_no.CP1252@europt_br.CP1252pt_pt.CP1252pt_pt.CP1252@eurosv_se.CP1252sv_se.CP1252@euro

el_gr.1253

Appendix C. Supported locales C-5

Page 124: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Locales CP1254, CP1255, and CP1256

The following table lists the supported locales:

Table C-7. Information for locales CP1254, CP1255, and CP1256

Locale CP1254 Locale CP1255 Locale CP1256

tr_tr.CP1254@ifix iw_il.1255iw_il.1255@gregiw_il.1255@hebr

ar_ae.1256ar_ae.1256@gregar_ae.1256@islaar_bh.1256ar_bh.1256@gregar_bh.1256@islaar_kw.1256ar_kw.1256@gregar_kw.1256@islaar_om.1256ar_om.1256@gregar_om.1256@islaar_qa.1256ar_qa.1256@gregar_qa.1256@islaar_sa.1256ar_sa.1256@gregar_sa.1256@isla

Locales big5, gb, ksc, and cp949

The following table lists the supported locales:

Table C-8. Information for locales big5, and gb

Locale big5 Locale gb Locales ksc and cp949

zh_cn.big5zh_tw.big5zh_hk.big5-HKSCS

(needs to be mapped tozh_tw.Big5-HKSCS

for Java/JDBCconnection)

zh_cn.gbzh_tw.gb

ko_kr.kscko_kr.cp949

(Needs mapping toko_kr.windows-949for Java/JDBCconnection)

Locales 866, KOI-8, and thai620

The following table lists the supported locales:

Table C-9. Information for locales 866, KOI-8, thai620

Locale 866 Locale KOI-8 Locale thai620

ru_ru.866 ru_ru.KOI-8 th_th.thai620

C-6 IBM Informix Warehouse Accelerator Administration Guide

Page 125: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Appendix D. Accessibility

IBM strives to provide products with usable access for everyone, regardless of ageor ability.

Accessibility features for IBM Informix productsAccessibility features help a user who has a physical disability, such as restrictedmobility or limited vision, to use information technology products successfully.

Accessibility featuresThe following list includes the major accessibility features in IBM Informixproducts. These features support:v Keyboard-only operation.v Interfaces that are commonly used by screen readers.v The attachment of alternative input and output devices.

Keyboard navigationThis product uses standard Microsoft Windows navigation keys.

Related accessibility informationIBM is committed to making our documentation accessible to persons withdisabilities. Our publications are available in HTML format so that they can beaccessed with assistive technology such as screen reader software.

IBM and accessibilitySee the IBM Accessibility Center at http://www.ibm.com/able for more informationabout the IBM commitment to accessibility.

Dotted decimal syntax diagramsThe syntax diagrams in our publications are available in dotted decimal format,which is an accessible format that is available only if you are using a screen reader.

In dotted decimal format, each syntax element is written on a separate line. If twoor more syntax elements are always present together (or always absent together),the elements can appear on the same line, because they can be considered as asingle compound syntax element.

Each line starts with a dotted decimal number; for example, 3 or 3.1 or 3.1.1. Tohear these numbers correctly, make sure that your screen reader is set to readpunctuation. All syntax elements that have the same dotted decimal number (forexample, all syntax elements that have the number 3.1) are mutually exclusivealternatives. If you hear the lines 3.1 USERID and 3.1 SYSTEMID, your syntax caninclude either USERID or SYSTEMID, but not both.

The dotted decimal numbering level denotes the level of nesting. For example, if asyntax element with dotted decimal number 3 is followed by a series of syntaxelements with dotted decimal number 3.1, all the syntax elements numbered 3.1are subordinate to the syntax element numbered 3.

© Copyright IBM Corp. 2010, 2012 D-1

Page 126: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Certain words and symbols are used next to the dotted decimal numbers to addinformation about the syntax elements. Occasionally, these words and symbolsmight occur at the beginning of the element itself. For ease of identification, if theword or symbol is a part of the syntax element, the word or symbol is preceded bythe backslash (\) character. The * symbol can be used next to a dotted decimalnumber to indicate that the syntax element repeats. For example, syntax element*FILE with dotted decimal number 3 is read as 3 \* FILE. Format 3* FILEindicates that syntax element FILE repeats. Format 3* \* FILE indicates thatsyntax element * FILE repeats.

Characters such as commas, which are used to separate a string of syntaxelements, are shown in the syntax just before the items they separate. Thesecharacters can appear on the same line as each item, or on a separate line with thesame dotted decimal number as the relevant items. The line can also show anothersymbol that provides information about the syntax elements. For example, the lines5.1*, 5.1 LASTRUN, and 5.1 DELETE mean that if you use more than one of theLASTRUN and DELETE syntax elements, the elements must be separated by a comma.If no separator is given, assume that you use a blank to separate each syntaxelement.

If a syntax element is preceded by the % symbol, that element is defined elsewhere.The string following the % symbol is the name of a syntax fragment rather than aliteral. For example, the line 2.1 %OP1 refers to a separate syntax fragment OP1.

The following words and symbols are used next to the dotted decimal numbers:

? Specifies an optional syntax element. A dotted decimal number followedby the ? symbol indicates that all the syntax elements with acorresponding dotted decimal number, and any subordinate syntaxelements, are optional. If there is only one syntax element with a dotteddecimal number, the ? symbol is displayed on the same line as the syntaxelement (for example, 5? NOTIFY). If there is more than one syntax elementwith a dotted decimal number, the ? symbol is displayed on a line byitself, followed by the syntax elements that are optional. For example, ifyou hear the lines 5 ?, 5 NOTIFY, and 5 UPDATE, you know that syntaxelements NOTIFY and UPDATE are optional; that is, you can choose one ornone of them. The ? symbol is equivalent to a bypass line in a railroaddiagram.

! Specifies a default syntax element. A dotted decimal number followed bythe ! symbol and a syntax element indicates that the syntax element is thedefault option for all syntax elements that share the same dotted decimalnumber. Only one of the syntax elements that share the same dotteddecimal number can specify a ! symbol. For example, if you hear the lines2? FILE, 2.1! (KEEP), and 2.1 (DELETE), you know that (KEEP) is thedefault option for the FILE keyword. In this example, if you include theFILE keyword but do not specify an option, default option KEEP is applied.A default option also applies to the next higher dotted decimal number. Inthis example, if the FILE keyword is omitted, default FILE(KEEP) is used.However, if you hear the lines 2? FILE, 2.1, 2.1.1! (KEEP), and 2.1.1(DELETE), the default option KEEP only applies to the next higher dotteddecimal number, 2.1 (which does not have an associated keyword), anddoes not apply to 2? FILE. Nothing is used if the keyword FILE is omitted.

* Specifies a syntax element that can be repeated zero or more times. Adotted decimal number followed by the * symbol indicates that this syntaxelement can be used zero or more times; that is, it is optional and can be

D-2 IBM Informix Warehouse Accelerator Administration Guide

Page 127: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

repeated. For example, if you hear the line 5.1* data-area, you know thatyou can include more than one data area or you can include none. If youhear the lines 3*, 3 HOST, and 3 STATE, you know that you can includeHOST, STATE, both together, or nothing.

Notes:

1. If a dotted decimal number has an asterisk (*) next to it and there isonly one item with that dotted decimal number, you can repeat thatsame item more than once.

2. If a dotted decimal number has an asterisk next to it and several itemshave that dotted decimal number, you can use more than one itemfrom the list, but you cannot use the items more than once each. In theprevious example, you can write HOST STATE, but you cannot write HOSTHOST.

3. The * symbol is equivalent to a loop-back line in a railroad syntaxdiagram.

+ Specifies a syntax element that must be included one or more times. Adotted decimal number followed by the + symbol indicates that this syntaxelement must be included one or more times. For example, if you hear theline 6.1+ data-area, you must include at least one data area. If you hearthe lines 2+, 2 HOST, and 2 STATE, you know that you must include HOST,STATE, or both. As for the * symbol, you can repeat a particular item if it isthe only item with that dotted decimal number. The + symbol, like the *symbol, is equivalent to a loop-back line in a railroad syntax diagram.

Appendix D. Accessibility D-3

Page 128: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

D-4 IBM Informix Warehouse Accelerator Administration Guide

Page 129: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Notices

This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document inother countries. Consult your local IBM representative for information on theproducts and services currently available in your area. Any reference to an IBMproduct, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product,program, or service that does not infringe any IBM intellectual property right maybe used instead. However, it is the user's responsibility to evaluate and verify theoperation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matterdescribed in this document. The furnishing of this document does not grant youany license to these patents. You can send license inquiries, in writing, to:

IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBMIntellectual Property Department in your country or send inquiries, in writing, to:

Intellectual Property LicensingLegal and Intellectual Property LawIBM Japan Ltd.1623-14, Shimotsuruma, Yamato-shiKanagawa 242-8502 Japan

The following paragraph does not apply to the United Kingdom or any othercountry where such provisions are inconsistent with local law: INTERNATIONALBUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS"WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFNON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULARPURPOSE. Some states do not allow disclaimer of express or implied warranties incertain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors.Changes are periodically made to the information herein; these changes will beincorporated in new editions of the publication. IBM may make improvementsand/or changes in the product(s) and/or the program(s) described in thispublication at any time without notice.

Any references in this information to non-IBM websites are provided forconvenience only and do not in any manner serve as an endorsement of thosewebsites. The materials at those websites are not part of the materials for this IBMproduct and use of those websites is at your own risk.

© Copyright IBM Corp. 2010, 2012 E-1

Page 130: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

IBM may use or distribute any of the information you supply in any way itbelieves appropriate without incurring any obligation to you.

Licensees of this program who wish to have information about it for the purposeof enabling: (i) the exchange of information between independently createdprograms and other programs (including this one) and (ii) the mutual use of theinformation which has been exchanged, should contact:

IBM CorporationJ46A/G4555 Bailey AvenueSan Jose, CA 95141-1003U.S.A.

Such information may be available, subject to appropriate terms and conditions,including in some cases, payment of a fee.

The licensed program described in this document and all licensed materialavailable for it are provided by IBM under terms of the IBM Customer Agreement,IBM International Program License Agreement or any equivalent agreementbetween us.

Any performance data contained herein was determined in a controlledenvironment. Therefore, the results obtained in other operating environments mayvary significantly. Some measurements may have been made on development-levelsystems and there is no guarantee that these measurements will be the same ongenerally available systems. Furthermore, some measurements may have beenestimated through extrapolation. Actual results may vary. Users of this documentshould verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers ofthose products, their published announcements or other publicly available sources.IBM has not tested those products and cannot confirm the accuracy ofperformance, compatibility or any other claims related to non-IBM products.Questions on the capabilities of non-IBM products should be addressed to thesuppliers of those products.

All statements regarding IBM's future direction or intent are subject to change orwithdrawal without notice, and represent goals and objectives only.

All IBM prices shown are IBM's suggested retail prices, are current and are subjectto change without notice. Dealer prices may vary.

This information is for planning purposes only. The information herein is subject tochange before the products described become available.

This information contains examples of data and reports used in daily businessoperations. To illustrate them as completely as possible, the examples include thenames of individuals, companies, brands, and products. All of these names arefictitious and any similarity to the names and addresses used by an actual businessenterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, whichillustrate programming techniques on various operating platforms. You may copy,

E-2 IBM Informix Warehouse Accelerator Administration Guide

Page 131: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

modify, and distribute these sample programs in any form without payment toIBM, for the purposes of developing, using, marketing or distributing applicationprograms conforming to the application programming interface for the operatingplatform for which the sample programs are written. These examples have notbeen thoroughly tested under all conditions. IBM, therefore, cannot guarantee orimply reliability, serviceability, or function of these programs. The sampleprograms are provided "AS IS", without warranty of any kind. IBM shall not beliable for any damages arising out of your use of the sample programs.

Each copy or any portion of these sample programs or any derivative work, mustinclude a copyright notice as follows:

© (your company name) (year). Portions of this code are derived from IBM Corp.Sample Programs.

© Copyright IBM Corp. _enter the year or years_. All rights reserved.

If you are viewing this information softcopy, the photographs and colorillustrations may not appear.

TrademarksIBM, the IBM logo, and ibm.com are trademarks or registered trademarks ofInternational Business Machines Corp., registered in many jurisdictions worldwide.Other product and service names might be trademarks of IBM or other companies.A current list of IBM trademarks is available on the web at "Copyright andtrademark information" at http://www.ibm.com/legal/copytrade.shtml.

Adobe, the Adobe logo, and PostScript are either registered trademarks ortrademarks of Adobe Systems Incorporated in the United States, and/or othercountries.

Intel, Itanium, and Pentium are trademarks or registered trademarks of IntelCorporation or its subsidiaries in the United States and other countries.

Java and all Java-based trademarks and logos are trademarks or registeredtrademarks of Oracle and/or its affiliates.

Linux is a registered trademark of Linus Torvalds in the United States, othercountries, or both.

Microsoft, Windows, and Windows NT are trademarks of Microsoft Corporation inthe United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and othercountries.

Other company, product, or service names may be trademarks or service marks ofothers.

Notices E-3

Page 132: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

E-4 IBM Informix Warehouse Accelerator Administration Guide

Page 133: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Index

Special characters/dev/shm 3-8

AAccelerated query tables

described 1-1, 5-1states 5-1

Acceleratorconnecting to Informix 4-1

accelerator serverdirectory 2-2

Accelerator serverconfiguring 3-1configuring for hardware clusters 3-2

Accessibility D-1dotted decimal format of syntax diagrams D-1keyboard D-1shortcut keys D-1syntax diagrams, reading in a screen reader D-1

Administration interfaceSee Tools for administering Informix Warehouse Accelerator

Aggregate functions 1-13Aggregate tables 5-2AQTs

See Accelerated query tables

CCLUSTER_INTERFACE parameter 3-2, 3-5cluster.conf file 3-2compliance with standards ixConfiguring

accelerator server 3-1dwainst.conf file 3-5overview 3-1sbspace 2-3SBSPACENAME configuration parameter 2-3secondary servers 3-3

Configuring hardware clustersaccelerator server 3-2

conn.prop.std 1-8Coordinator node 1-7

memory issues 3-8COORDINATOR_SHM parameter 3-5

DData currency 5-20Data mart definitions

creating 5-7defined 5-5

Data marts 5-5aggregate tables 5-2creating 5-16defined 5-5deploying 5-19described 1-1, 5-2dimension table 5-2

Data marts (continued)dropping 5-29example, creating 5-8fact table 5-2loading data 5-18, 5-19overview 5-2refreshing data 5-20star schema 5-2summary tables 5-2updating data 5-28

Data typessupported 1-12

Database serverschema changes 5-28

Dimension tablessample 5-2

Directoriesaccelerator server 2-2accelerator server storage 3-1documentation 2-2IBM Smart Analytics Optimizer Studio 2-2installation 2-2samples 2-2storage 2-2

Directories for hardware clustersaccelerator server storage 3-2

Disabilities, visualreading syntax diagrams D-1

Disability D-1Dotted decimal format of syntax diagrams D-1DRDA_INTERFACE parameter 3-5dropPartMart() function 5-26DWA_CM binary 3-12dwa_java_quickref.txt 1-8dwa_java_reference.txt 1-8dwa_message_reference.txt 1-8dwacli.jar 1-8DWADIR parameter 3-5dwainst.conf file

ondwa setup command 3-12parameters 3-5

EExamples

genmartdef function 5-15probe2mart stored procedure 5-14workload analysis 5-8

FFact tables 5-18

sample 5-2Fix pack 2-6Functions

aggregate functions 1-13dropPartMart() 5-26genmartdef 5-15loadPartMart() 5-27scalar functions 1-13

© Copyright IBM Corp. 2010, 2012 X-1

Page 134: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

Functions (continued)user-defined functions 1-13

GGenmartdef function

examples 5-15syntax 5-15

HHigh-availability secondary servers

configuring 3-3

IIBM Smart Analytics Optimizer Studio

creating data marts 5-16installing 2-5

industry standards ixInformix Warehouse Accelerator

architecture 1-4installing 2-1, 2-4operating system 2-1reinstalling 2-6uninstalling 2-6

Installingdirectory 2-2IBM Smart Analytics Optimizer Studio 2-5Informix Warehouse Accelerator 2-4overview 2-1

JJava classes 1-8Java commands 1-8Join descriptors 5-13, B-1Join predicates 5-13, B-1Joins

join combinations 1-15join predicates 1-15many-to-many 5-17one-to-many 5-17supported 1-15unsupported 1-15

KKey steps for accelerating queries 1-3

LloadPartMart() function 5-27Locales v

supported C-1

MMany-to-many joins 5-17Memory issues 3-8

NNUM_NODES parameter 3-5

Oondwa utility

clean command 3-17dwainst.conf file 3-12getpin command 3-15overview 3-11reset command 3-17running a cluster system 3-11setup command 3-12start command 3-13status command 3-14stop command 3-16tasks command 3-16users who can run the command 3-11

One-to-many joins 5-17onstat -g aqt command 5-1Operating systems

supported 2-1Overview 1-1

PPrerequisites

operating system 2-1software 2-1

Probe2martreversion requirements 8-1

Probe2mart stored procedureexamples 5-14syntax 5-14tables 5-14

Probing dataremoving 5-16

QQueries

acceleration considerations 1-9analyze 1-10not accelerated 1-12types accelerated 1-9

Query probingcreating data marts 5-7example 5-8removing data 5-16

RRefreshing data

at the partition level 5-21at the table level 5-26data marts 5-20example 5-22

ReinstallingInformix Warehouse Accelerator 2-6

Reversionworkload analysis tables 8-1

X-2 IBM Informix Warehouse Accelerator Administration Guide

Page 135: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

SSamples

queryprofit by store 1-11revenue by item 1-10revenue by store 1-11week to day profits 1-11

warehouse schema A-1sbspace

configuring 2-3SBSPACENAME configuration parameter 2-3Scalar functions 1-13Schemas

sample SQL A-1Screen reader

reading syntax diagrams D-1Secondary servers

configuring 3-3SET ENVIRONMENT

statement 5-16Shared memory configuration 3-8SHMMAX kernel parameter 3-8Shortcut keys

keyboard D-1Smart Analytics Optimizer Studio

installing 2-5Snowflake schema 1-1standards ixStar schema

sample 5-2START_PORT parameter 3-5Stored procedures

probe2mart examples 5-14probe2mart syntax 5-14

Summary tables 5-2Swap space 3-8Swap space configuration 3-8Syntax

genmartdef function 5-15Syntax diagrams

reading in a screen reader D-1

TTable partitions

refreshing data 5-21Tables

refreshing data 5-26Troubleshooting

memory issues 3-8sbspace 9-1

UUninstalling

Informix Warehouse Accelerator 2-6updating 2-6use_dwa environment variable 6-1use_dwa variable environment variable 9-1User-defined functions 1-13

VVirtual memory usage 3-8

Visual disabilitiesreading syntax diagrams D-1

vm.overcommit_memory kernel parameter 3-8vm.overcommit_ratio kernel parameter 3-8

WWorker nodes 1-7

memory issues 3-8WORKER_SHM parameter 3-5Workload analysis 5-6

creating data marts 5-7

Index X-3

Page 136: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

X-4 IBM Informix Warehouse Accelerator Administration Guide

Page 137: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,
Page 138: IBM InformixWarehouseAccelerator Administration Guideinformixsoftware.com/ids117/Warehouse Accelerator... · 2013-11-08 · By using secondary servers for Informix Warehouse Accelerator,

����

Printed in USA

SC27-3851-02