Help Center/ DataArts Studio/ FAQs/ DataArts Migration (CDM Jobs)/ What Should I Do If Error Message "query has reached the maximum query timeout" Is Displayed During Migration from OceanBase?
Updated on 2025-11-17 GMT+08:00

What Should I Do If Error Message "query has reached the maximum query timeout" Is Displayed During Migration from OceanBase?

Symptom

Error message "query has reached the maximum query timeout" is displayed during migration from OceanBase.

Figure 1 Error code

Possible Causes

During sharding, CDM queries the minimum and maximum values of table fields and uses the values as the sharding fields to execute SQL: SELECT MIN(ORA_HASH(ROWID)) FROM "HEIO"."ORDERS" WHERE 1 = 1; SELECT MAX(ORA_HASH(ROWID)) FROM "HEIO"."ORDERS" WHERE 1 = 1. In native Oracle, this SQL statement only takes about 500 ms to process millions of data records. However, in OceanBase, this SQL statement takes about 10s to process the same amount of data, so the SQL statements times out.

Solution

Set the SQL timeout interval for OceanBase to 60s: SET GLOBAL ob_query_timeout = 60000000.