Automation for Accelerated Tables

Modified on Mon, 30 Nov at 12:51 PM

Accelerated Tables – IBM Db2 Analytics Accelerator

IBM’s Db2 Analytics Accelerator (IDAA or ‘Accelerator’) delivers high-speed processing for complex Db2 queries in support of business-critical reporting and analytic workloads.

IDAA improves performance and reduces query response time by providing high-speed access paths for resolving Db2 queries where tables accessed by these queries have been copied into IDAA. The source tables in Db2 are referred to as Accelerated Tables. The target tables in IDAA are known as Accelerator-Shadow Tables (IDAA Shadow Tables).

The Db2 Optimizer calculates and compares the cost of executing an incoming query with respect to available access paths for that query. If the optimizer estimates that an available access path utilizing IDAA will process a query at a lower cost than the database management system itself, the query is routed to IDAA.

The Challenge: Synchronizing Data Between Db2 Tables and IDAA Accelerated Tables

It is important to quickly and consistently propagate changes to Db2 Accelerated Tables to the corresponding IDAA Shadow Tables. IBM provides an Integrated Synchronization mechanism that utilizes the Db2 Log to incrementally update Accelerators as the corresponding Db2 Accelerated Tables change. IBM’s Integrated Synchronization, however, does not address all synchronization requirements. In the case of certain Db2 utility processes, changes are not recorded to the Db2 Log. Integrated Synchronization will not pick up on these unrecorded changes. When Db2 Accelerated Table data is changed by a Db2 utility without logging, the Accelerators must be refreshed by reloading the data to their Shadow Tables. Db2 utility processes that bypass the Db2 Log and Integrated Synchronization include:

  • RECOVERing data to a previous point in time
  • LOADing data into a table
  • using REORG to discard rows from a table
  • using CHECK DATA to copy and delete rows that violate referential or table check constraints

In these cases, the Database Administrator must reload the Accelerated Tables using IDAA Db2 Stored Procedures.

IDAA Stored Procedures give administrators the ability to define and enable a variety of IDAA functions including:

  • adding and removing Db2 tables from an Accelerator
  • enabling and disabling acceleration of Db2 tables
  • enabling and disabling replication of Db2 tables
  • reloading Accelerated Tables

IDAA stored procedures are invoked through the IDAA Administration Client. While they may also be called by SQL calls embedded in a program, the CALL must present syntactically correct table specifications using a strict XML format that follows a predetermined list of tags and attributes. It is no easy task to write, test and maintain XML to call IDAA Stored Procedures from programs. In addition, these embedded program calls must be ‘migrated’ when IDAA is upgraded from one version to the next, as the specifications and XML formats change from one version of IDAA to the next.

The Solution: TUC Automates Propagation of Unlogged Db2 Accelerated Table Changes to IDAA Shadow Tables

TUC automation detects all unlogged Db2 utility processes that require a reload of Accelerated Tables and ensures in these cases that Accelerators are always properly reloaded. TUC automation eliminates the need for administrative intervention and/or the need to code IDAA-related XML into programs.

TUC automatically invokes IDAA stored procedures based on the utility process being executed and the parameters defining that execution. TUC automation of the propagation of unlogged utility-modified Db2 table data to Accelerators first identifies whether or not the options used by the utility might result in unlogged changes. TUC then identifies if the utility actually changed the data. For example, REORG DISCARD can run with a set of predicates that might or might not remove rows from the Db2 table. In the latter case, regardless of its potential to do so, the utility process does not actually change the table data. TUC automation detects this and avoids reloading the Accelerated Table.

If reload is required, acceleration may need to be disabled before reloading. If a Db2 Accelerated Table has been loaded to multiple Accelerators, TUC has the intelligence to determine which accelerations should and should not be disabled during the reload process according to IDAA rules. If acceleration is disabled, it should be enabled as soon as the tables are reloaded. TUC determines the need and automates the processes.

Any one or more of the IDAA Stored Procedures might need to be executed, from the Administration Client or from a program, in order to propagate unlogged Db2 utility changes of Db2 Accelerated Tables. For example, in some cases, Accelerated Tables must be removed and readded before data can be reloaded. Before removing the tables, the current acceleration definition information must be retrieved from each affected Accelerator to allow the Accelerated Tables to be readded according to the original definitions. If replication was enabled before the tables were removed, it must be enabled again after the tables are readded and before the tables are reloaded. Finally, acceleration must be enabled immediately after the reload. In all scenarios, TUC automatically determines which IDAA Stored Procedures need to be invoked, how they need to be invoked, and in what order they need to be invoked.

The results of IDAA Stored Procedure execution are returned in XML format. There may be a need to analyze these XMLs to identify failures or to locate the successful results of an action. For example, the information returned may indicate the names of the tables that were loaded and the number of rows in each table. TUC adds additional value by parsing the complex XML format and returning results in easy-to-read reports.


TUC Automation Summary and Benefits

TUC automation dynamically detects unlogged Db2 utility change activity and builds the required XML specifications to reload all Shadow Tables across all Accelerators as needed. TUC-driven IDAA processes remove and readd tables, disable and enable acceleration and replication as necessary, and do so in the context of the parameters used to drive the specific execution of that utility (e.g. TUC can exploit automatic detection of changes and reload tables at partition level).

TUC’s automation exploits and leverages the standard IDAA Administration Stored Procedures, ensuring that unlogged Db2 table changes are propagated in a timely fashion without the need for administrative intervention. TUC automates the preparation and dynamic execution of IDAA XML specifications. TUC parses and presents XML results for easy interpretation. TUC’s online dialog allows the administrator to call IDAA administration actions for each table and for each Accelerator separately both online and in batch.

In short — TUC propagates unlogged Db2 utility changes to IDAA Accelerated Tables automatically, with no administrative steps and no XML to write.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article