Auto-Projections

Auto-projections are superprojections that Vertica automatically generates for tables, both temporary and persistent. The following rules apply to all auto-projections:

Auto-Projection Triggers

The conditions for creating auto-projections differ, depending on whether the table is temporary or persistent:

Table type Auto-projection trigger
Temporary CREATE TEMPORARY TABLE statement unless it includes NO PROJECTION.
Persistent CREATE TABLE statement contains one of these clauses:

If none of these conditions is true, Vertica automatically creates a superprojection (if one does not already exist) only when you first load data into the table with INSERT or COPY.

Default Segmentation and Sort Order

If CREATE TABLE or CREATE TEMPORARY TABLE omits a segmentation (SEGMENTED BY or UNSEGMENTED) or ORDER BY clause, Vertica segments and sorts auto-projections according to the table's manner of creation:

Constraints Sorted by: Segmented by:
Primary key Primary key Primary key
Primary and foreign keys
  1. Foreign keys
  2. Primary key
Primary key
Foreign keys only
  1. Foreign keys
  2. Remaining columns excluding LONG data types, in the order specified by CREATE TABLE.

All columns excluding LONG data types, up to the limit set in configuration parameter MaxAutoSegColumns (by default 32).

Vertica orders segmentation according to data type size, as follows:

  1. Small (< 8 byte) data type columns
  2. Large (>8 byte) data type columns
None All columns excluding LONG data types, in the order specified by CREATE TABLE.