If multiple columns are eligible for partitioning, the
engine queries the DB2 system tables for information about identity
columns and simple indexes. Based on the information about the identity
columns, simple indexes, column types, and column nullability, the
partitioning column is selected in order by priority.
-
-
Unique simple index:
SHORT or INT, integral DECIMAL, and then nonintegral DECIMAL
-
Nonunique simple index:
SHORT or INT (NOT NULL), integral DECIMAL (NOT NULL), and then nonintegral
DECIMAL (NOT NULL)
-
Nonunique simple index:
SHORT or INT (nullable), integral DECIMAL (nullable), and then nonintegral
DECIMAL (nullable)
-
SHORT or INT (NOT NULL),
integral DECIMAL (NOT NULL), and then nonintegral DECIMAL (NOT NULL)
-
SHORT or INT (nullable),
integral DECIMAL (nullable), and then nonintegral DECIMAL (nullable)
If a nullable column
is selected for autopartitioning, the SQL statement
OR<column-name>IS
NULL
is appended at the end of the SQL code that is generated
for one read thread. This ensures that any possible NULL values are
returned in the result set.