Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
root user to log in to the import host.cd/data/tdsql3_run/6008/SQLEngine/bin/
./myloader -h 10.34.159.202 -P 17110 -u test -p test123 -t 20 -B sbtest -d /data/TDSQLV30/Module8-409/TDSQL3-TOOLS/bin/loader_file -r 8000 -q 100 --max-threads-per-table=20 --max-retry-statement-count=10 --max-retry-checkpoint-count=10 --not-create-database --insert-ignore=True --append-if-not-exist --enable-tdsql-bulk-load -v 3
Parameter | Parameter Full Name | Description |
--enable-tdsql-bulk-load | --enable-tdsql-bulk-load | Enable the Bulk Load mode for import. |
--enable-tdsql-bulk-load-allow-unsorted | --enable-tdsql-bulk-load-allow-unsorted | It indicates that out-of-order primary key data is supported during Bulk Load imports. When the records in the imported data files are not sorted by primary key, it is necessary to add --enable-tdsql-bulk-load-allow-unsorted. |
-r | --rows | -r × -q is used to control the size of transactions. In Bulk Load mode, it is recommended that the data volume per transaction be between 100MB and 10GB.When importing from data files ( .sql), MyLoader does not generate transactions that span across multiple data files. This means that even if the -r × -q parameters are set to large values, if a .sql file contains only 1000 records, a transaction generated by MyLoader will consist of only those 1000 records and will not exceed the size of a single data file. Therefore, it is essential to ensure that the data files themselves are sufficiently large. |
-q | --queries-per-transaction | |
-h | --host | TDSQL Boundless IP address for database connections. |
-P | --port | TDSQL Boundless port for database connections. |
-u | --user | TDSQL Boundless account for database connections. |
-p | --password | |
-B | --database | Name of the target database. |
-d | --directory | Specify the directory of the data files to be loaded. |
-t | --threads | The number of threads used for loading data, defaults to 4. |
--max-threads-per-table | --max-threads-per-table | The maximum number of threads used per table is used to set, defaults to 4. |
--max-retry-statement-count | --max-retry-statement-count | Used to set the maximum number of times to retry a statement when a single query fails, defaults to 0. |
--max-retry-checkpoint-count | --max-retry-checkpoint-count | Used to set the maximum number of retries when a checkpoint error occurs, defaults to 0. |
--not-create-database | --not-create-database | MyLoader will not create a database but will attempt to import data into the specified database. If the specified database does not exist, MyLoader will report an error and halt the import process. |
--insert-ignore | --insert-ignore | Enable the INSERT IGNORE statement when duplicate primary key records are inserted. |
--append-if-not-exist | --append-if-not-exist | Add the IF NOT EXISTS clause to the CREATE TABLE statement. |
-v | --verbose | Set the verbosity level of log output. 0: Silent mode, outputs no information. 1: Outputs only error messages. 2 (default value): Outputs warning messages and error messages. 3: Outputs informational messages, warning messages, and error messages. 4: Outputs debug messages, informational messages, warning messages, and error messages. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários