Help Center/ Data Replication Service/ Troubleshooting/ Solutions to Failed Check Items/ Database Parameters/ Whether the Maximum Number of Indexed Columns Has Been Reached
Updated on 2023-02-15 GMT+08:00

Whether the Maximum Number of Indexed Columns Has Been Reached

DB2 for LUW -> GaussDB Synchronization

Table 1 Whether the maximum number of indexed columns has been reached

Check Item

Whether the maximum number of indexed columns has been reached

Description

The number of indexed columns to be migrated in the source database cannot exceed 32.

Failure Cause and Handling Suggestion

Failure cause: The number of indexed columns to be migrated in the source database cannot exceed 32.

Handling suggestion: Check the number of indexed columns in the source table and modify the indexes.

Statement for viewing indexed columns:

SELECT T1.INDNAME ,T1.COLNAMES FROM  SYSCAT.INDEXES AS T1 JOIN SYSCAT.INDEXCOLUSE AS T2 ON T1.INDNAME= T2.INDNAME WHERE  T1. TABNAME='table_name' AND T1. INDNAME= 'index_name';

Statement for deleting an index:

DROP INDEX index_name;

Statement for creating an index:

CREATE INDEX index_name ON table_name(col1,col2);