mysql> SHOW SLAVE STATUSG
*************************** 1. row ***************************
...
Master_Log_File: binlog.0000185
Read_Master_Log_Pos: 86698585
...
Relay_Master_Log_File: binlog.0000185
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
...
Exec_Master_Log_Pos: 380
Relay_Log_Space: 85699128
...
Master_UUID: 98974e7f-2fbc-18e9-72cd-07003817585c
...
Retrieved_Gtid_Set: 98974e7f-2fbc-18e9-72cd-07003817585c:1055-1057
Executed_Gtid_Set: 7f42e2c5-3fbc-16e7-7fb8-05003715789a:1-2,
98974e7f-2fbc-18e9-72cd-07003817585c:1-1056
...
从中继日志中读取事件;
2)目前
mysql> SHOW PROCESSLIST;
+----+-----------------+-----------------+------+---------+------+----------------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-----------------+-----------------+------+---------+------+----------------------------------+------------------+
...
| 4 | system user | | NULL | Connect | 268 | Reading event from the relay log | NULL |
...
+----+-----------------+-----------------+------+---------+------+----------------------------------+------------------+
SELECT tables.table_schema, tables.table_name, tables.table_rows
FROM information_schema.tables
LEFT JOIN (
SELECT table_schema, table_name
FROM information_schema.statistics
GROUP BY table_schema, table_name, index_name
HAVING
SUM(
CASE WHEN non_unique = 0 AND nullable != YES THEN 1 ELSE 0 END
) = COUNT(*)
) puks
ON tables.table_schema = puks.table_schema AND tables.table_name = puks.table_name
WHERE puks.table_name IS NULL
AND tables.table_schema NOT IN (mysql, information_schema, performance_schema, sys)
AND tables.table_type = BASE TABLE AND engine=InnoDB;
mysql> SET GLOBAL slave_rows_search_algorithms = INDEX_SCAN,HASH_SCAN;
意味着切换到哈希扫描只会在以下情况下提高 SQL 线程的性能:
只能在 MySQL 配置文件中设置 binlog_row_event_max_size ,重置该值需要重启数据库。
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129433.html
摘要:通过对一些客户的跨云迁移过程进行总结,发现普遍存在的挑战有三点数据完整性和一致性挑战。简而言之,跨云迁移过程中的数据一致性主要就集中在存量数据的迁移如何保证一致。前言随着互联网业务发展对容灾以及对访问加速、多供应商成本控制等需求的产生,互联网公司的多云部署和跨云迁移逐渐成为刚需,而在此过程中,最困扰运维和研发人员的就是数据的迁移和同步。俗语说 上屋搬下屋,搬洒一箩谷 ,在业务的迁移过程中一旦...
阅读 1347·2023-01-11 13:20
阅读 1685·2023-01-11 13:20
阅读 1133·2023-01-11 13:20
阅读 1860·2023-01-11 13:20
阅读 4101·2023-01-11 13:20
阅读 2705·2023-01-11 13:20
阅读 1386·2023-01-11 13:20
阅读 3598·2023-01-11 13:20