Professional Documents
Culture Documents
Teradata PPI
Teradata PPI
An indexing mechanism in the Teradata Database for use in physical database design
Partitions numbered 1 up to 65535 Includes range, conditional, modulo, and general expression partitioning
CREATE TABLE
PARTITION BY partitioning-expression
The value of the partitioning expression for a row determines the partition number of the row
Must be a value between 1 and 65535 Use RANGE_N function to define a mapping of ranges of values to an INTEGER Use CASE_N function to define a mapping between conditions to an INTEGER
5
CREATE TABLE
The partition expression definition is the only thing that needs to be done by the DBA
No separate partition layout No disk layout for partitions No definition of location in the system for partitions No need to define/manage separate tables per segment of the table that needs to be accessed Even data distribution and even processing of a logical partition is automatic
AMP
AMP
AMP
Table A
RH
AMP
AMP
Partition 2
Partition 4
Table
...
. . .
Partition N
. . .
Partition N
. . .
Partition N
...
AMP
AMP
AMP
Note: Rows in the same partition are distributed among the AMPs based on the hash
12
13
14
18
19