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;
意味著切換到哈希掃描只會(huì)在以下情況下提高 SQL 線程的性能:
只能在 MySQL 配置文件中設(shè)置 binlog_row_event_max_size ,重置該值需要重啟數(shù)據(jù)庫(kù)。
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/129433.html
摘要:通過對(duì)一些客戶的跨云遷移過程進(jìn)行總結(jié),發(fā)現(xiàn)普遍存在的挑戰(zhàn)有三點(diǎn)數(shù)據(jù)完整性和一致性挑戰(zhàn)。簡(jiǎn)而言之,跨云遷移過程中的數(shù)據(jù)一致性主要就集中在存量數(shù)據(jù)的遷移如何保證一致。前言隨著互聯(lián)網(wǎng)業(yè)務(wù)發(fā)展對(duì)容災(zāi)以及對(duì)訪問加速、多供應(yīng)商成本控制等需求的產(chǎn)生,互聯(lián)網(wǎng)公司的多云部署和跨云遷移逐漸成為剛需,而在此過程中,最困擾運(yùn)維和研發(fā)人員的就是數(shù)據(jù)的遷移和同步。俗語說 上屋搬下屋,搬灑一籮谷 ,在業(yè)務(wù)的遷移過程中一旦...
閱讀 1356·2023-01-11 13:20
閱讀 1707·2023-01-11 13:20
閱讀 1215·2023-01-11 13:20
閱讀 1906·2023-01-11 13:20
閱讀 4165·2023-01-11 13:20
閱讀 2757·2023-01-11 13:20
閱讀 1402·2023-01-11 13:20
閱讀 3671·2023-01-11 13:20