Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mariadb Galera群集多主机查询执行缓慢_Mariadb_Galera_Multi Master Replication - Fatal编程技术网

Mariadb Galera群集多主机查询执行缓慢

Mariadb Galera群集多主机查询执行缓慢,mariadb,galera,multi-master-replication,Mariadb,Galera,Multi Master Replication,我对Galera multi master有问题。当我在node1中运行querySELECT时,执行时间为0.025秒,但在node2上执行相同的查询时,执行时间为5.172秒,在node3中执行结果为4.347秒 节点1配置: 节点2配置: 节点3配置: 我正在节点上执行的查询是: select `users`.*, `upd`.`first_name`, `upd`.`middle_name`, `upd`.`last_name`, CONCAT_WS(upd.first

我对Galera multi master有问题。当我在node1中运行querySELECT时,执行时间为0.025秒,但在node2上执行相同的查询时,执行时间为5.172秒,在node3中执行结果为4.347秒

节点1配置:

节点2配置:

节点3配置:

我正在节点上执行的查询是:

select  `users`.*, `upd`.`first_name`, `upd`.`middle_name`, `upd`.`last_name`,
        CONCAT_WS(upd.first_name, upd.middle_name, upd.last_name) AS full_name
    from  `users`
    inner join  `users_personal_data` as `upd`  ON `upd`.`user_id` = `users`.`id`
    order by  `id` desc
    limit  20 offset 0;

此问题来自何处?

解释选择的结果是:

+------+-------------+-------+------+-------------------------------------+------+---------+------+------+-------------------------------------------------+
| id   | select_type | table | type | possible_keys                       | key  | key_len | ref  | rows | Extra                                           |
+------+-------------+-------+------+-------------------------------------+------+---------+------+------+-------------------------------------------------+
|    1 | SIMPLE      | users | ALL  | PRIMARY                             | NULL | NULL    | NULL |    1 | Using temporary; Using filesort                 |
|    1 | SIMPLE      | upd   | ALL  | users_personal_data_user_id_foreign | NULL | NULL    | NULL |    1 | Using where; Using join buffer (flat, BNL join) |
+------+-------------+-------+------+-------------------------------------+------+---------+------+------+-------------------------------------------------+
请获取解释选择。。。在其中一个慢速节点上。这可能给我们一个线索。还显示创建表。
[mysqld]

log_error=/var/log/mariadb.log

[galera]

wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://192.168.2.47,192.168.2.48,192.168.2.49,172.29.44.11"
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_cluster_name="CCCluster"
bind-address=0.0.0.0
wsrep_node_address="192.168.2.49"
wsrep_node_name="node1"
wsrep_sst_method=rsync
select  `users`.*, `upd`.`first_name`, `upd`.`middle_name`, `upd`.`last_name`,
        CONCAT_WS(upd.first_name, upd.middle_name, upd.last_name) AS full_name
    from  `users`
    inner join  `users_personal_data` as `upd`  ON `upd`.`user_id` = `users`.`id`
    order by  `id` desc
    limit  20 offset 0;
+------+-------------+-------+------+-------------------------------------+------+---------+------+------+-------------------------------------------------+
| id   | select_type | table | type | possible_keys                       | key  | key_len | ref  | rows | Extra                                           |
+------+-------------+-------+------+-------------------------------------+------+---------+------+------+-------------------------------------------------+
|    1 | SIMPLE      | users | ALL  | PRIMARY                             | NULL | NULL    | NULL |    1 | Using temporary; Using filesort                 |
|    1 | SIMPLE      | upd   | ALL  | users_personal_data_user_id_foreign | NULL | NULL    | NULL |    1 | Using where; Using join buffer (flat, BNL join) |
+------+-------------+-------+------+-------------------------------------+------+---------+------+------+-------------------------------------------------+