![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
martin_yl
这个作者很懒,什么都没留下…
展开
-
MySQL主从复制搭建,基于日志(binlog)
MySQL主从复制搭建,基于日志(binlog) 2017-04-14 by Raye 什么是MySQL主从复制 简单来说就是保证主SQL(Master)和从SQL(Slave)的数据是一致性的,向Master插入数据后,Slave会自动从Master把修改的数据同步过来(有一定的延迟),通过这种方式来保证数据的一致性,就是主从复制MySQL主从能解决什么问题 一、高可用 因为数据都是相同转载 2017-04-18 09:55:28 · 291 阅读 · 0 评论 -
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 解决办法
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 解决办法在连接中加入&autoReconnect=true&failOverReadOnly=false 可解决原创 2017-05-03 21:07:58 · 624 阅读 · 0 评论 -
处理百万级以上的数据查询提高效率的办法
1.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描。2.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。3.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null转载 2017-07-27 11:14:08 · 344 阅读 · 0 评论