Attribute description of DB2 partition compatibility type

Source: Internet
Author: User

This article mainly describes how to correctly understand the DB2 partition compatibility and compare the basic data types of the columns corresponding to the partition key, and declare them as partition compatible ). Partition-compatible data types have the following attributes:

Two variables with the same value but different types are mapped to the same partition number according to the same partition algorithm.

Recently I have been reading some DB2 DPF things. I have two concepts that I don't understand.

This is the concept of "partition compatibility" and "Parallel.

I found some related materials, including the following:

Partition compatibility

You can compare the basic data types of the corresponding columns of the partition key, and declare them as partition compatible ). Partition-compatible data types have the following attributes: two variables with the same value but different types are mapped to the same partition number according to the same partition algorithm. DB2 partition compatibility has the following features:

The basic data type is compatible with another similar basic data type.

The internal format is used for DATE, TIME, and TIMESTAMP data types. They are not compatible with each other and are not compatible with CHAR.

Partition compatibility is NOT affected by columns defined with not null or for bit data.

Processing of NULL values of compatible data types is completely the same; processing of NULL values of incompatible data types may be different.

The basic data types of user-defined types are used to analyze DB2 partition compatibility.

The processing of decimal places with the same value in the partition key is exactly the same, even if their scale and precision are different.

Spaces at the end of a string (CHAR, varchar graphic, or VARGRAPHIC) are ignored by the hash algorithm.

BIGINT, SMALLINT, and INTEGER are compatible data types.

REAL and FLOAT are compatible data types.

CHAR and VARCHAR of different lengths are compatible data types.

GRAPHIC and VARGRAPHIC are compatible data types.

Partition compatibility is not applicable to long varchar, long vargraphic, CLOB, DBCLOB, and BLOB data types because they cannot be used as partition keys.

The above content is a description of the correct understanding of DB2 partition compatibility, hoping to help you in this regard.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.