看了一下、我可以看到了,谢谢啊:sweat_smile:
为什么插入一条语句就要毫秒级
配置:
[2020/04/18 15:14:36.189 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=7] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=0] [current_db=] [txn_mode=PESSIMISTIC] [sql="START TRANSACTION"]
[2020/04/18 15:14:36.190 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=7] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073403905081345] [current_db=] [txn_mode=PESSIMISTIC] [sql="INSERT INTO `dm_meta`.`test_tidb_syncer_checkpoint` (`id`, `cp_schema`, `cp_table`, `binlog_name`, `binlog_pos`, `is_global`) VALUES('mysql4','','','db1m-bin|000001.000047',65470827,1) ON DUPLICATE KEY UPDATE `binlog_name`='db1m-bin|000001.000047', `binlog_pos`=65470827"]
[2020/04/18 15:14:36.195 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=7] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073403905081345] [current_db=] [txn_mode=PESSIMISTIC] [sql=COMMIT]
[2020/04/18 15:14:48.296 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1893] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=0] [current_db=] [txn_mode=PESSIMISTIC] [sql="START TRANSACTION"]
[2020/04/18 15:14:48.296 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=0] [current_db=] [txn_mode=PESSIMISTIC] [sql="START TRANSACTION"]
[2020/04/18 15:14:48.297 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1893] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073407077023745] [current_db=] [txn_mode=PESSIMISTIC] [sql="UPDATE `h3_stock`.`t_stock_a` SET `id` = 758817, `group_id` = 20000, `company_id` = 100120178, `business_id` = 100120184, `ware_inside_code` = 10088, `qualified_qty` = 10, `reserved_qty` = 0, `to_be_inspected_qty` = 0, `unqualified_qty` = 0, `in_transit_qty` = 0, `expected_qty` = 1005, `to_be_processed_qty` = 0, `weighted_average_price` = 0, `modify_time` = '2020-04-18 15:13:40.891' WHERE `id` = 758817 LIMIT 1;"]
[2020/04/18 15:14:48.297 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073407077023746] [current_db=] [txn_mode=PESSIMISTIC] [sql="INSERT INTO `h3_warehouse`.`t_warehouse_initial_stock` (`id`,`initial_stock_code`,`group_id`,`company_id`,`business_id`,`supplier_code`,`supplier_inside_code`,`user_id`,`settler_code`,`payment_period`,`pay_type`,`target_business_id`,`document_status`,`after_status`,`effect_time`,`create_user`,`create_time`,`modify_user`,`modify_time`,`instance_id`,`note`,`is_delete`) VALUES (68,'QCRK20200418000003',20000,100120178,100120184,'820056',820056,6666,'0002',28,16,NULL,2,NULL,NULL,6666,'2020-04-18 15:13:41',6666,'2020-04-18 15:13:41','1208312','',2);"]
[2020/04/18 15:14:48.301 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1893] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073407077023745] [current_db=] [txn_mode=PESSIMISTIC] [sql="UPDATE `h3_stock`.`t_stock_a` SET `id` = 758816, `group_id` = 20000, `company_id` = 100120178, `business_id` = 100120184, `ware_inside_code` = 10019, `qualified_qty` = 6, `reserved_qty` = 0, `to_be_inspected_qty` = 0, `unqualified_qty` = 0, `in_transit_qty` = 0, `expected_qty` = 1277, `to_be_processed_qty` = 3, `weighted_average_price` = 0, `modify_time` = '2020-04-18 15:13:40.891' WHERE `id` = 758816 LIMIT 1;"]
[2020/04/18 15:14:48.302 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073407077023746] [current_db=] [txn_mode=PESSIMISTIC] [sql="INSERT INTO `h3_warehouse`.`t_warehouse_initial_stock_ware` (`id`,`initial_stock_id`,`ware_code`,`ware_inside_code`,`made_number`,`stall_id`,`ware_number`,`purchase_price`,`production_date`,`valid_until`,`sterilization_batch_number`,`sterilization_time`,`purchase_tax_rate_id`,`sale_tax_rate_id`,`is_delete`) VALUES (130,68,'10088',10088,'PH20200417',3571,1000,10,'2020-04-01','2024-05-04','MJ123456789',NULL,8,7,2);"]
[2020/04/18 15:14:48.304 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1893] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073407077023745] [current_db=] [txn_mode=PESSIMISTIC] [sql=COMMIT]
[2020/04/18 15:14:48.306 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073407077023746] [current_db=] [txn_mode=PESSIMISTIC] [sql="INSERT INTO `h3_warehouse`.`t_warehouse_initial_stock_ware` (`id`,`initial_stock_id`,`ware_code`,`ware_inside_code`,`made_number`,`stall_id`,`ware_number`,`purchase_price`,`production_date`,`valid_until`,`sterilization_batch_number`,`sterilization_time`,`purchase_tax_rate_id`,`sale_tax_rate_id`,`is_delete`) VALUES (131,68,'10019',10019,'PH20200418',3572,1200,30,'2020-04-01','2025-04-26','MJ789456123',NULL,6,6,2);"]
[2020/04/18 15:14:48.309 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073407077023746] [current_db=] [txn_mode=PESSIMISTIC] [sql="INSERT INTO `h3_stock`.`t_stock_idempotence` (`id`,`group_id`,`company_id`,`business_id`,`bill_type`,`bill_number`,`business_type`,`operate_time__millis_str`) VALUES (3295,20000,100120178,100120184,19,'QCRK20200418000003',1,'1587194020859');"]
[2020/04/18 15:14:48.312 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073407077023746] [current_db=] [txn_mode=PESSIMISTIC] [sql=COMMIT]
[2020/04/18 15:15:02.502 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=0] [current_db=] [txn_mode=PESSIMISTIC] [sql="START TRANSACTION"]
[2020/04/18 15:15:02.503 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073410799468546] [current_db=] [txn_mode=PESSIMISTIC] [sql="UPDATE `h3_stock`.`t_stock_a` SET `id` = 758732, `group_id` = 20000, `company_id` = 100120178, `business_id` = 100120184, `ware_inside_code` = 10008, `qualified_qty` = -17, `reserved_qty` = 25, `to_be_inspected_qty` = 0, `unqualified_qty` = 0, `in_transit_qty` = 0, `expected_qty` = 88, `to_be_processed_qty` = 0, `weighted_average_price` = 0, `modify_time` = '2020-04-18 15:13:55.133' WHERE `id` = 758732 LIMIT 1;"]
[2020/04/18 15:15:02.507 +08:00] [INFO] [session.go:2139] [GENERAL_LOG] [conn=1895] [user=root@192.168.10.101] [schemaVersion=660] [txnStartTS=416073410799468546] [current_db=] [txn_mode=PESSIMISTIC] [sql=COMMIT]