15.00 - Rules for Partition Formats in a Column-Partitioned Table - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

Rules for Partition Formats in a Column‑Partitioned Table

  • If you specify COLUMN format for a column partition, Teradata Database stores 1 or more column partition values in a physical container.
  • A column partition value consists of the values of the columns contained in the column partition.

  • The following rule applies to autocompression for a column partitioning level.
  •  

    IF you specify this autocompression option or if it is the default for the column partitioning level …

    THEN Teradata Database applies autocompression unless the partition is explicitly specified with this option …

    COLUMN AUTO COMPRESS

    NO AUTO COMPRESS.

    COLUMN NO AUTO COMPRESS

    AUTO COMPRESS.

  • If you specify COLUMN without also specifying AUTO COMPRESS or NO AUTO COMPRESS for a column partitioning level, Teradata Database assigns the default autocompression for the partitioning level.
  • The default autocompression for your system is determined by the value of the AutoCompressDefault cost profile constant.

     

    IF AutoCompressDefault is set to …

    THEN the default autocompression is …

    1

    COLUMN AUTO COMPRESS

    2

    COLUMN NO AUTOCOMPRESS

    For more information about the AutoCompressDefault cost profile constant, see SQL Request and Transaction Processing.

  • If you specify ROW format for a column partition, Teradata Database stores only 1 column partition value in a physical subrow.
  • A subrow is a standard Teradata row format, and the term is used to emphasize that it is part of a column partitioning.

  • If you specify a column or constraint grouping or both with COLUMN format in the column list, the grouping defines a column partition and Teradata Database stores 1 or more column partition values in a physical container using COLUMN format.
  • If you specify a column or constraint grouping or both with ROW format in the column list, the grouping defines a column partition that stores only 1 column partition value in a physical subrow using ROW format.

    If you specify neither COLUMN nor ROW format for a column or constraint grouping, the grouping defines a column partition and Teradata Database determines whether to use a COLUMN or ROW format for that column partition.

  • If you do not specify an explicit COLUMN or ROW format for a partition, Teradata Database makes the determination for you implicitly.
  • When the COLUMN or ROW format is system‑determined, Teradata Database bases its choice of format on the size of a column partition value for the column partition and other factors such as whether a column partition value for the column partition has fixed or variable length and whether the column partition is a single‑column or multicolumn partition.

    Teradata Database generally assigns a COLUMN format to a narrow column partition and assigns a ROW format to a wide column partition. In this context, a column partition is considered to be narrow when its size is roughly 256 or fewer bytes.

    The width of a variable length column in a column partition is estimated as .

    Any other column partition size is considered to be wide by definition.

    You can submit a HELP COLUMN request or select the ColumnPartitionFormat column from the DBC.ColumnsV(X) view to determine which format Teradata Database elected to use for a column partition.