日期:2014-05-16  浏览次数:20691 次

MyISAM表,如果只select、insert的话,并发性如何?
如题。如果只进行select和insert的话,会锁表吗?并发处理能力如何?

------解决方案--------------------
在默认的隔离级别由于有mvcc 所以select不锁定任何东西

insert只会锁定当前行
------解决方案--------------------
select 不锁表。
但MYISAM中INSERT会锁表。
------解决方案--------------------
insert也可以和select并发

If AUTO (the default), MySQL permits INSERT and SELECT statements to run concurrently for MyISAM tables that have no free blocks in the middle of the data file. If you start mysqld with --skip-new, this variable is set to NEVER.