`
bestxiaok
  • 浏览: 444558 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

for update和for update nowait

 
阅读更多
锁定表的所有行,排斥其他针对这个表的写操作。确保只有当前事务对指定表进行写操作。
for update 和 for update nowait的区别是,别的事务要对这个表进行写操作时,是等待一段时间还是马上就被数据库系统拒绝而返回。
分享到:
评论
3 楼 bestxiaok 2011-10-28  
for update 和 for update nowait
HyEidolon 写道
不够详细。。看得我比较蒙,楼主能跟我讲一下么?

而for update nowait的作用与for update相同,不同的是其他事务申请被锁定的行数据时是等待该事务释放资源,还是直接返回无法获得资源。
一般加上nowait操作比较好,不用再那墨迹,不过一般不会碰到这种情况。。。
2 楼 HyEidolon 2011-10-28  
不够详细。。看得我比较蒙,楼主能跟我讲一下么?
1 楼 HyEidolon 2011-10-28  
   不懂额 ~~

相关推荐

    for_update_和_for_update_nowait_的区别

    for_update_和_for_update_nowait_的区别

    oracle中UPDATE nowait 的使用方法介绍

    SQL语句: Sql代码: 代码如下: SELECT * FROM hold_mc_site_product_pic pic WHERE pic.id = 730127 FOR UPDATE nowait 2、应用在多线程并发的情况下。先查询出要处理的数据,并加入数据库级的锁,处理完后,写入...

    Python Sqlalchemy如何实现select for update

    sqlalchemy 对于行级锁有两种实现方式,with_lockmode(self, mode): 和 with_for_update(self, read=False, nowait=False, of=None),前者在sqlalchemy 0.9.0 被废弃,用后者代替。所以我们使用with_for_update ! 看...

    simple-tags

    * Add compatibility with WordPress 2.7, use new API for HTTP and Admin. No new features ! * Version 1.5.7 * Move autolink after ShortCodes * Add Italian and German translation * Fix a potential ...

    SQL Prompt_9.1.15.5260破解版

    SP-7005 : Formatting an UPDATE STATISTICS statement will no longer process out of scope parentheses and cause a "Can't align to a future token 'Update'" crash. SP-7021 : Aliases in quotes no longer ...

    微软内部资料-SQL性能优化3

    For example, suppose a transaction scanned a page using an S lock and then subsequently decided to perform a row level update. The row would obtain an X lock, but now the page would require an IX ...

    EurekaLog_7.5.0.0_Enterprise

    17)..Added: Support for relative file paths and environment variables for events and various module paths 18)..Added: Logging in Manage tool 19)..Added: Windows 10 version detection 20)..Added: Stack ...

    jdbc基础和参考

    save-update:对当前对象执行save,update, saveOrupdate,会级联操作和它相关联的对象 delete:在删除当前对象的时候,级联删除和他相关联的对象 all: save-update+delete delete-orphan:解除关联关系时,删除和当前...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    Ideally, one should check VsIsReady() using a timer or the like to wait efficiently, so that the host PC is free to do other tasks while waiting for the VariSpec. The VariSpec always processes each ...

    Turbo C 2.01[DISK]

    Update from TC 1.5 - This allows for an easy update from version 1.5. After the files are copied, all the installed options from your current TC.EXE will be transferred to the new one. This is ...

    oracle中锁的级别和锁表语句

    文章目录锁模式值列表锁表语句例子wait 和 nowait锁模式row share(share update) 2级锁row exclusive 3级锁share 4级锁share row exclusive 5级锁exclusive 6级锁各个锁的例子其他 锁模式值列表 值为0-6。其实常见的...

    Turbo C 2.00[DISK]

    Update from TC 1.5 - This allows for an easy update from version 1.5. After the files are copied, all the installed options from your current TC.EXE will be transferred to the new one. This is ...

    SQL Server死锁总结

    SQL Server死锁总结 ...非剥夺条件(No pre-emption):已经分配的资源不能从相应的进程中被强制地剥夺。 循环等待条件(Circular wait):系统中若干进程组成环路,该环路中每个进程都在等待相邻进程正占用的资源。

    Bochs - The cross platform IA-32 (x86) emulator

    - Added support for VGA graphics mode with 400 lines (partial fix for SF bug #2948724) - NE2K: Fixed "send buffer" command issue on big endian hosts - USB - converted common USB code plus devices ...

    CE中文版-启点CE过NP中文.exe

    Symbolhandler: When the symbolhandler now waits till it's done, it won't wait for the structures to be parsed anymore Additions and Changes: Lua Engine: Added autocomplete DLL injection: On DLL ...

    acpi控制笔记本风扇转速

    Disassembler - fix for error emitted for unknown type for target of scope operator. Now, ignore it and continue. Disassembly of an FADT now verifies the input FADT and reports any errors found. Fix ...

    MATLAB GUI

    能量守恒gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... ...% UIWAIT makes myxiaoqiu wait for user response (see UIRESUME) % uiwait(handles.figure1);

    让Oracle跑得更快 Oracle 10g性能分析与优化思路.part2.rar

    2.3.1 select for update 30 2.3.2 外键和索引 36 第3章 latch和等待 44 3.1 共享池中的latch争用 45 .3.2 数据缓冲池latch争用 54 3.2.1 表数据块 54 3.2.2 索引数据块 59 3.2.3 索引根数据块 62 3.2.4 段头数据块 ...

    让Oracle跑得更快 Oracle 10g性能分析与优化思路.part1.rar

    2.3.1 select for update 30 2.3.2 外键和索引 36 第3章 latch和等待 44 3.1 共享池中的latch争用 45 .3.2 数据缓冲池latch争用 54 3.2.1 表数据块 54 3.2.2 索引数据块 59 3.2.3 索引根数据块 62 3.2.4 段头数据块 ...

Global site tag (gtag.js) - Google Analytics