SQL Reference
Partition compatibility is defined between the base data types
of corresponding columns of partitioning keys. Partition compatible
data types have the property that two variables, one of each type, with the
same value, are mapped to the same partitioning map index by the same
partitioning function.
Table 9 shows the compatibility of data types in partitions.
Partition compatibility has the following characteristics:
- Internal formats are used for DATE, TIME, and TIMESTAMP. They are
not compatible with each other, and none are compatible with CHAR.
- Partition compatibility is not affected by columns with NOT NULL or FOR
BIT DATA definitions.
- NULL values of compatible data types are treated identically.
Different results might be produced for NULL values of non-compatible data
types.
- Base datatype of the UDT is used to analyze partition
compatibility.
- Decimals of the same value in the partitioning key are treated
identically, even if their scale and precision differ.
- Trailing blanks in character strings (CHAR, VARCHAR, GRAPHIC or
VARGRAPHIC) are ignored by the system-provided hashing function.
- CHAR or VARCHAR of different lengths are compatible data types.
- REAL or DOUBLE values that are equal are treated identically even though
their precision differs.
Table 9. Partition Compatibilities
Operands
| Binary Integer
| Decimal Number
| Floating Point
| Character String
| Graphic String
| Date
| Time
| Time- stamp
| Distinct Type
| Structured Type
|
Binary Integer
| Yes
| No
| No
| No
| No
| No
| No
| No
| 1
| No
|
Decimal Number
| No
| Yes
| No
| No
| No
| No
| No
| No
| 1
| No
|
Floating Point
| No
| No
| Yes
| No
| No
| No
| No
| No
| 1
| No
|
Character String3
| No
| No
| No
| Yes2
| No
| No
| No
| No
| 1
| No
|
Graphic String3
| No
| No
| No
| No
| Yes
| No
| No
| No
| 1
| No
|
Date
| No
| No
| No
| No
| No
| Yes
| No
| No
| 1
| No
|
Time
| No
| No
| No
| No
| No
| No
| Yes
| No
| 1
| No
|
Timestamp
| No
| No
| No
| No
| No
| No
| No
| Yes
| 1
| No
|
Distinct Type
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| 1
| No
|
Structured Type3
| No
| No
| No
| No
| No
| No
| No
| No
| No
| No
|
Note: |
- 1
- A user-defined distinct type (UDT) value is partition compatible with the
source type of the UDT or any other UDT with a partition compatible source
type.
- 2
- The FOR BIT DATA attribute does not affect the partition
compatibility.
- 3
- Note that user-defined structured types and data types LONG VARCHAR, LONG
VARGRAPHIC, CLOB, DBCLOB, and BLOB are not applicable for partition
compatibility since they are not supported in partitioning keys.
|
|
[ Top of Page | Previous Page | Next Page ]