Enabling tables for query acceleration

You can permit or prevent the sending of queries to an accelerator by enabling or disabling the corresponding accelerator-shadow tables.

Before you begin

  • You need a connection to a database that has an accelerator attached to it.
  • You (your user ID) must be connected to the database and have the rights to control the accelerator.
  • The tables must have been defined on the accelerator.

About this task

After its creation, an accelerator-shadow table is in load pending state. Query acceleration is disabled for tables in this state. The load pending state is also reached when an error has led to an operation failure. Also, when data has been loaded into a table, the table is not automatically enabled. Therefore, you must enable the table so that it becomes active and will thus be used in accelerated queries. You can disable or re-enable a loaded accelerator-shadow table by switching query acceleration for this table on or off. To enable a table, the table must be in loaded or update in progress state.

If partitions of a table have been archived by the High Performance Storage Saver, these partitions no longer belong to the regular accelerator-shadow table. Enabling this table for accelerated queries will thus not enable the archived partitions. To include archived partitions in accelerated queries, use the GET_ACCEL_ARCHIVE special register in your queries or set this option as a ZPARM.

Tip: If you want to disable all tables, you better stop the entire accelerator. For more information, see the link under Related tasks at the end.

The task of enabling tables for query acceleration is carried out by the SYSPROC.ACCEL_SET_TABLES_ACCELERATION stored procedure on your data server. For information about the privileges that are required to run this procedure and further details, follow the appropriate Related reference link at the end of this topic.

When an accelerator-shadow table has been enabled, the corresponding entry in the ENABLED column of the system table SYSACCEL.SYSACCELERATEDTABLES is set to ON. Although an accelerator-shadow table can exist on more than one accelerator, it can be enabled on one accelerator only. If a table is in a state that does not permit enabling, the operation ends abnormally and the enablement is canceled.

Important:
  • Query acceleration can be always disabled regardless of the state an accelerator-shadow table is in. This is useful if you need to recover from an error situation in which an accelerator is down or unreachable.
  • You might have to reload or even remove tables from an accelerator after the execution of an ALTER TABLE or ALTER TABLESPACE statement in Db2 for z/OS®. For more information, see What to do after changing a table or table space in Db2 for z/OS. You find a Related reference link at the end of this topic.

Procedure

  1. In the Administration Explorer, select the Accelerators folder.
  2. In the Object List Editor, double-click the accelerator containing the tables that you want to enable.
  3. In the list on the lower part of the view, select the tables that you want to enable.
  4. Click Acceleration > Enable on the toolbar.

Results

Queries against these tables are accelerated if the associated accelerator has been started.