Defining tables for grid queries

Define the tables that you want to include in grid queries as grid tables.

Before you begin

The only prerequisite for defining a table as a grid table is that the table must have the same name, column names, and data types on multiple grid servers. However, the GRID clause has other restrictions and requirements for running grid queries.

About this task

You can include system catalog and sysmaster databases tables in grid queries without defining them as grid tables.

Procedure

To define a table as a grid table, run the cdr change gridtable command. The cdr change gridtable command verifies that the tables have matching column names and data types across the grid.

Example

For example, the following command defines the items, orders, and customer tables in the stores_demo database for the grid named grid1:
cdr change gridtable -–grid=grid1 -–database=stores_demo -–add items orders customer 

What to do next

If you want to alter a grid table, you must run the alter operation through the grid. You cannot run a grid query on the table during an alter operation. After the alter operation is complete, the database server verifies that the table is consistent across grid servers.