MYSQL一个innodb表的字段被比较频繁的被修改,对这个表的读操作有多大的影响,如何优化呢?


当然,读操作不一定是读取被修改的那几行。

mysql innodb

majia 11 years, 11 months ago

从性能上说,不会有任何影响。
http://dev.mysql.com/doc/refman/5.6/en/innodb-consistent-read.html

Consistent read is the default mode in which InnoDB processes SELECT statements in READ COMMITTED and REPEATABLE READ isolation levels. A consistent read does not set any locks on the tables it accesses, and therefore other sessions are free to modify those tables at the same time a consistent read is being performed on the table.

InnoDB的缺省隔离级别是REPEATABLE READ,Consistent non-blocking read是缺省模式。也就是说select不会被update block住。这被称为mvcc。

Arikado answered 11 years, 11 months ago

Your Answer