关于数据库 System lock 状态的说明和处理方式
来源:互联网 发布:小知插件 编辑:程序博客网 时间:2024/06/14 13:28
关于数据库 System lock 状态的说明和处理方式
@2010-08-24 for&ever
A、对于MySQL来说:
执行命令show processlist ,可以看到当前的MySQL进程中有好多System lock的状态。
查询MySQL手册:
System lock
The thread is going to request or is waiting for an internal or external system lock for the table. If this state is being caused by requests for external locks and you are not using multiple mysqld servers that are accessing the same tables, you can disable external system locks with the --skip-external-locking option. However, external locking is disabled by default, so it is likely that this option will have no effect. For SHOW PROFILE, this state means the thread is requesting the lock (not waiting for it).
因此,如果不是几个 mysqld 服务共用一个表文件,可以通过设置参数--skip-external-locking 来禁止系统锁定
B、对于 InforBright来说:
有如下的说法:
IB has only table-level locks. When doing any write operation to a table an exlusive lock is set on it and any other queries needing this table must wait until the writing transaction commits. And vice versa - if a table is used for reading, loading must wait.
I can only suggest, that instead of inserts you can use LOAD command - it runs much faster than inserts. It maybe easier then to find a window between reports to run a load successfully.
You can also use two symmetrical databases. Reporting from one while loading to another. Surely, each load must be done twice then, so thye databases are eventually identical.
也就是说:
InfoBright 会优先读,因此在LoadData的时候(也就是写数据的时候)会被锁定。
那么,如果当前出现了锁定状态,造成写数据的进程始终无法完成,怎么办呢?
很简单,在写数据的时候,只要暂停一下读写,等写完数据再读取即可。
@2010-8-24 forandever
- 关于数据库 System lock 状态的说明和处理方式
- 检索数据库table的lock状态
- 关于lock(this)的说明及用法
- 关于system.drawing.imaging类的说明和范例
- 关于Lucene的详细说明和操作使用方式
- 关于Lucene的详细说明和操作使用方式
- 关于数据库附加不上的错误处理方式
- 关于Lock和Lock Contention的2张图
- lsnrctl 中 关于status 状态的说明
- 关于ecshop数据库表和字段的说明
- 锁对象Lock-同步问题更完美的处理方式
- 锁对象Lock-同步问题更完美的处理方式
- 锁对象Lock-同步问题更完美的处理方式
- 锁对象Lock-同步问题更完美的处理方式
- ipv6 “无状态地址分配”和 “有状态地址分配” 两种IPV6地址分配方式的区别说明
- 状态 组合情况 太多的处理方式
- lua关于表的处理和输出方式整理
- .Net 内存溢出(System.OutOfMemoryException)的常见情况和处理方式总结
- Welcome!
- 共享内存---shmget shmat shmdt
- Managed code and Unmanaged code
- struts1.2.9源码解析
- SAP Developer Challenge 2010
- 关于数据库 System lock 状态的说明和处理方式
- 用GDB调试程序(一)
- Linux环境进程间通信(五): 共享内存(上)
- Linux环境进程间通信(五): 共享内存(下)
- interface与abstract class的区别小结
- sharepoint2010 用stsadm.exe 部署vs2010webpart
- 有关数据库在大数据量情况下全模糊搜索的提速方法
- sprintf用法
- ASCII/Unicode的结合与 STL 的 string 类的方法