select for update nowait 与 select for update 区别
2017-07-02 11:19
597 查看
nowait的含义“不用等待,立即返回”,如果当前请求的资源被其他会话锁定时,会发生阻塞,nowait可以避免这一阻塞!!
使用select for update nowait:如果表被其他的用户进程锁了,则会立即返回“ORA-00054:资源正忙,但指定以NOWAIT方式获取资源”
使用select for update:如果表被其他的用户进程锁了,则会一直阻塞直到其他的用户进程释放了锁!其实,各数据库的处理机制是不一样的,例如:Mysql的话,会阻塞一段时间,接着抛出以下Error Code:1205异常:
而,Oracle的话,会一直阻塞!
使用select for update nowait:如果表被其他的用户进程锁了,则会立即返回“ORA-00054:资源正忙,但指定以NOWAIT方式获取资源”
使用select for update:如果表被其他的用户进程锁了,则会一直阻塞直到其他的用户进程释放了锁!其实,各数据库的处理机制是不一样的,例如:Mysql的话,会阻塞一段时间,接着抛出以下Error Code:1205异常:
Error Code : 1205 Lock wait timeout exceeded; try restarting transaction (0 ms taken)
而,Oracle的话,会一直阻塞!
相关文章推荐
- select for update nowait 与 select for update 区别 [z]
- select for update和select for update wait和select for update nowait的区别
- select for update和select for update wait和select for update nowait的区别
- select for update nowait 与 select for update 区别
- select for update nowait 与 select for update 区别
- oracle select语句中,不加for update和加 for update和for update nowait区别
- select for update nowait 与 select for update 区别
- for update、for update nowait、select t.*,t.rowid from table的区别
- (转)oracle for update和for update nowait的区别
- Select for update nowait
- Postgre中的 select for update 和 select for update nowait
- for update 和 for update nowait 的区别
- No NOWAIT Option in MySQL SELECT FOR UPDATE
- for update 和 for update nowait的区别
- select for update与select for nowait
- for update 和 for update nowait 区别
- oracle for update和for update nowait的区别
- Select for update, nowait, skip locked
- oracle for update和for update nowait的区别
- MySQL中的行级锁SELECT FOR UPDATE 和LOCK IN SHARE MODE 区别