Teradata Cookbook
上QQ阅读APP看书,第一时间看更新

Partitioning tables column wise

Starting with Teradata 14.0, a new feature was introduced called Columnar. Using a partition primary index (PPI), Teradata partitions tables into rows. But now you can also partition tables column wise. 

Columnar provides you with this feature. You can now partition tables with a high number of columns into smaller tables. This not only reduces the I/O, but space too, by auto compressing column containers. Tables can be row partitioned plus column partitioned.

Advantages of using the Teradata Columnar can be the following:

  • Improved query performance
  • Reduced disk space
  • Reduced I/O
  • Ease of use

Please note there are certain features of Columnar that are not available in later versions of the database but are in Teradata 15.10:

  • Has the primary index (from version 15.10)
  • Has the primary AMP index (from version 15.10)
  • Joins index column-based partitions (previous version also)
  • NOPI table column-based partitions (previous version also)
  • No SET tables (previous version also)
  • No Temp tables (previous version also)
  • Fastload/Mload/Merge not allowed (previous version also)

These features of Teradata need to be enabled separately and, before implementing any design changes, the Teradata engineering team needs to be consulted.

 In this recipe, we will create a column-based partition on a table.