1.任何情况下SELECT COUNT(*) FROM tablename是最优选择;
2.尽量减少SELECT COUNT(*) FROM tablename WHERE COL = ‘value’ 这种查询;
3.杜绝SELECT COUNT(COL) FROM tablename WHERE COL2 = ‘value’ 的出现。
060807 11:40:17 [ERROR] While trying to obtain the list of
slaves from the master ‘xxx.xxx.xxx:3306′, user ‘rep’ got the
following error: ‘Access denied. You need the REPLICATION SLAVE
privilege for this operation’