【 TiDB 使用环境】测试
【 TiDB 版本】V8.1.0
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】使用DATAX导入20个字段的表速度最大只有一万多条/秒,如下图
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
服务器硬盘是HDD
【附件:截图/日志/监控】
DATAX执行日志
Datax脚本文件
{
"core":{
"transport":{
"channel":{
"speed":{
"record":-1,
"byte":-1,
"batchSize": 4096
}
}
}
},
"job": {
"setting": {
"speed": {
"channel": 1
}
},
"content": [
{
"reader": {
"name": "oraclereader",
"parameter": {
"username": "test",
"password": "1111111",
"connection": [
{
"jdbcUrl": [
"jdbc:oracle:thin:@192.168.0.22:1521:orcl"
],
"querySql": [
"select EVALUATE_DETAIL_OPTION_ID ,EVALUATE_DETAIL_OPTION_CODE ,EVALUATE_DETAIL_CODE ,PROJECT_CODE ,USER_CODE ,TEACHING_CLASS_CODE ,OPTION_CODE ,KPI_CODE ,KPI_TYPE ,KPI_NAME ,OPTION_VALUE ,OPTION_SCORE ,VALID_CODE ,OPERATOR_ID ,UNIVERSITY_ID ,CREATED_DATE ,STATE ,STATE_DATE ,MEMO ,EVALUATE_CODE
from DSJ10035828"
]
}
]
}
},
"writer": {
"name": "mysqlwriter",
"parameter": {
"writeMode": "insert",
"username": "test",
"password": "1111111",
"column": ["EVALUATE_DETAIL_OPTION_ID" ,"EVALUATE_DETAIL_OPTION_CODE" ,"EVALUATE_DETAIL_CODE" ,"PROJECT_CODE" ,"USER_CODE" ,"TEACHING_CLASS_CODE" ,"OPTION_CODE" ,"KPI_CODE" ,"KPI_TYPE" ,"KPI_NAME" ,"OPTION_VALUE" ,"OPTION_SCORE" ,"VALID_CODE" ,"OPERATOR_ID" ,"UNIVERSITY_ID" ,"CREATED_DATE" ,"STATE" ,"STATE_DATE" ,"MEMO" ,"EVALUATE_CODE"],
"preSql": ["truncate table asf_dsj10035828"],
"postSql": ["select 1 from dual"],
"batchSize": 15000,
"connection": [
{
"jdbcUrl": "jdbc:mysql://192.168.0.12:4000/mysql_dev_raw?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true&useSSL=false&remarks=true&useInformationSchema=true",
"table": [
"`asf_dsj10035828`"
]
}
]
}
}
}
]
}
}
表结构
CREATE TABLE `asf_dsj10035828` (
`evaluate_detail_option_id` decimal(38,0) DEFAULT NULL,
`evaluate_detail_option_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
`evaluate_detail_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
`project_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
`user_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
`teaching_class_code` varchar(120) COLLATE utf8mb4_general_ci DEFAULT NULL,
`option_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
`kpi_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
`kpi_type` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
`kpi_name` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
`option_value` varchar(2000) COLLATE utf8mb4_general_ci DEFAULT NULL,
`option_score` decimal(10,2) DEFAULT NULL,
`valid_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
`operator_id` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
`university_id` decimal(38,0) DEFAULT NULL,
`created_date` timestamp NULL DEFAULT NULL,
`state` varchar(3) COLLATE utf8mb4_general_ci DEFAULT NULL,
`state_date` timestamp NULL DEFAULT NULL,
`memo` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
`evaluate_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
监控相关截图