Document Type | Technical Information
Category | Migration
Applicable Product Version | 6FS05, 6FS06
Document Number | TMITI012
Overview
When migrating large tables (with over 100 million rows) or tables containing LOB data using table_migrator, there may be cases where the speed decreases.
This document explains a method to divide the migration of large tables using table_migrator into multiple shells and run them in parallel.
Method
If a primary key index or an index on a date column is set, you can utilize that column in the SELECT_CONDITION option to generate multiple shell scripts and execute them in parallel. This can reduce the migration time.
The example below shows how to divide the migration into multiple mig shells and run them in parallel.
1. Creating migration scripts
#vi mig1.sh sh migrator.sh PROPERTY_FILE=DPL.prop SOURCE_SCHEMA=TIBERO SOURCE_TABLE=MIG_TEST TARGET_SCHEMA=TIBERO TARGET_TABLE=MIG_TEST1 LOG_FILE_NAME=TIBERO.MIG_TEST.log INSERT_PARALLEL=Y INSERT_THREAD_COUNT=1 SELECT_CONDITION="B between '2025/02/01 00:00:00' and '2025/02/07 23:59:59'" #vi mig2.sh sh migrator.sh PROPERTY_FILE=DPL.prop SOURCE_SCHEMA=TIBERO SOURCE_TABLE=MIG_TEST TARGET_SCHEMA=TIBERO TARGET_TABLE=MIG_TEST1 LOG_FILE_NAME=TIBERO.MIG_TEST.log INSERT_PARALLEL=Y INSERT_THREAD_COUNT=1 SELECT_CONDITION="B between '2025/02/08 00:00:00' and '2025/02/14 23:59:59'" ... #vi mig5.sh sh migrator.sh PROPERTY_FILE=DPL.prop SOURCE_SCHEMA=TIBERO SOURCE_TABLE=MIG_TEST TARGET_SCHEMA=TIBERO TARGET_TABLE=MIG_TEST1 LOG_FILE_NAME=TIBERO.MIG_TEST.log INSERT_PARALLEL=Y INSERT_THREAD_COUNT=1 SELECT_CONDITION="B between '2025/02/22 00:00:00' and '2025/02/28 23:59:59'"
2. Run the created scripts simultaneously in the background
nohup mig1.sh > mig1.log & nohup mig2.sh > mig2.log & .. nohup mig5.sh > mig5.log &