Configuring the Initial Superprojection with CREATE TABLE Command

Each Data Warehouse table must have at least one projection with all columns: a superprojection. Without a superprojection, the database engine does not understand how the data should be stored.

When a new table is created using the CREATE TABLE command, a superprojection is created automatically provided that superprojection parameters are defined by either of the following:

  • ORDER BY that specifies the sorting order of the default superprojection
  • SEGMENTED BY expression ALL NODES and UNSEGMENTED ALL NODES that configure the segmentation of the default superprojection

If superprojection parameters are not specified, it can be created manually using CREATE PROJECTION or system creates it automatically when first row is inserted to the table.

Example:

CREATE TABLE customer (
  id INTEGER PRIMARY KEY,
  name_first VARCHAR(255),
  name_last VARCHAR(255)
) ORDER BY id
  SEGMENTED BY HASH(id) ALL NODES
Powered by Atlassian Confluence and Scroll Viewport.