MYSIAM表 并发插入
来源:互联网 发布:汽车设计软件发展趋势 编辑:程序博客网 时间:2024/06/03 20:12
上篇文章提到MyISAM表的读和写操作是串行的,但这只是总体而言的。在一定条件下,MyISAM表也支持查询和插入操作的并发进行。
MyISAM存储引擎的系统变量concurrent_insert,专门用以控制其并发插入的行为。
concurrent_insert(官方文档对这个参数的说明)
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 startmysqld with--skip-new
, this variable is set toNEVER
.
This variable can take the values shown in the following table. The variable can be assigned using either the name values or corresponding integer values.
NEVER
(or 0)Disables concurrent insertsAUTO
(or 1)(Default) Enables concurrent insert for MyISAM
tables that do not have holesALWAYS
(or 2)Enables concurrent inserts for all MyISAM
tables, even those that have holes. For a table with a hole, new rows are inserted at the end of the table if it is in use by another thread. Otherwise, MySQL acquires anormal write lock and inserts the row into the hole.0:不允许并发插入
1:(默认值)如果MYISAM表中没有空洞(即表中间没有被删除的行),MYSIAM允许在一个进程读表的同时,另一个进程从表尾插入记录。
2:无论MYSIAM表有没有空洞,都允许在表尾并发的插入记录。如果是得到了普通的写锁(即只有自己一个会话在使用表),那就可以将数据插入到空洞中。
当会话session1获得表的READ LOCAL锁,该线程可以对表进行查询操作,但不能对表进行操作;其他的会话(session2)虽然不能对表进行删除和
更新操作,但却可以对表进行并发插入操作,这里假设该表中间不存在空洞。
- MYSIAM表 并发插入
- mysql---mysiam和innodb表数据文件结构
- MySIAM与Innodb引擎
- mysql 并发插入优化
- MYSIAM和INNODB引擎区别
- MYSIAM和INNODB引擎区别
- MYSIAM和INNODB引擎区别
- Mysiam与Innodb的区别
- Mysiam和innodb的区别
- sql2000主从表插入并发问题的解决
- mysql 并发插入简单测试
- Mysql中Innodb与Mysiam区别
- 8.11.3 Concurrent Inserts 并发插入:
- java后台并发插入数据问题
- java 并发插入数据到oracle
- 并发环境下mysql插入检查方案
- 并发编程实例---批量插入数据
- 深入mysql并发插入优化详解
- ORA-12520与ORA-12514(监听相关问题)
- LeetCode(81) Search in Rotated Array II
- java记——随机数
- [MFC]CView视图类、CMainFrame主框架类
- 怎样提高自己的工作饱和度
- MYSIAM表 并发插入
- 位域所占空间的大小
- RUBiS安装——Servlet 配置
- ListView.SimpleAdapter笔记
- Spring IoC 详解(下篇)
- hdu 3336 KMP之杭电next灵魂
- 集中式vs分布式
- docker entry
- unix编程实训教程之 more(觉醒篇一 Begin)