行锁定,具有到表锁的升级。
这是因为新的x行锁定和is表锁定是不兼容的。
This is because the new X row lock and the is table lock are not compatible.
可使用LOCKTABLE命令来锁定一个表,而不是使用缺省的行锁定。
The LOCK TABLE command can be used to lock a table instead of using the default row locking.
由于我们没有操控锁,因此引擎在需要一行(或者页)时会对其进行锁定。
Since we are not manipulating locks ourselves, the engine is locking each row (or page) as it needs it.
如果使用此索引的查询可能会同时运行,则使用行锁定可能会提高性能。
If queries that use this index might run concurrently, you might increase performance by using row locks.
性能可能会提高的原因是行锁定可以更好地避免空间索引中按顺序排列的行出现死锁。
Performance might improve because rows locks can better avoid deadlocks with collocated rows in the spatial index.
应用程序2可以在表上建立一个IX锁定和一个x行锁定,因为表锁定ix兼容a1的in表锁定。
Application 2 can establish an IX lock on the table and an X row lock, because the table lock IX is compatible to the IN table lock from A1.
在游标定位在行中时,锁定这个被应用程序的某个事务访问的任何一行。
Locks any row accessed by a transaction of an application while the cursor is positioned on the row.
每位参赛者需要做的第一件事是将每个表更改为行级别锁定。
The first thing every contestant needed to do was change every table to row-level locking.
RR:锁定一个应用程序在一个工作单元内引用的所有行。
RR: Locks all the rows an application references within a unit of work.
虽然有一些增加并发的技巧,但是,如果应用程序需要的是表级别或行级别的锁定,那么DBMS能够更好地满足您的需求。
There are little tricks one can do to increase concurrency, but if your applications need table-level or row-level locks, a DBMS will better suit your needs.
可锁定的数据库对象有表空间、表和行,但是只有表和表空间可以显式地锁定。
Database objects that are lockable are table Spaces, tables and rows, however, only tables and table Spaces can be explicitly locked.
JIT编译器的这一行为使双重检查锁定的问题只不过是一次学术实践而已。
The fact that JIT compilers do just this makes the issues of double-checked locking more than simply an academic exercise.
不过,您可以使用乐观锁定技术循环访问一组行并单独更新每个数据行。
However, you can iterate through a set of rows and update each row individually while using optimistic locking techniques.
换句话说,我们顺序地扫描了此表,锁定了每个行,操作进行了很多次。
In other words, we have sequentially scanned this table, locking every row, a lot of times.
如果MD b以事务的方式锁定资源(例如,它可以锁定数据库行),则在批结束之前,这些资源将保持锁定。
If the MDB locks resources transactionally (for example, it may lock a database row), these resources will not become unlocked until the end of the batch.
RS:仅锁定应用程序在一个工作单元内检索的行。
RS: Locks only those rows that an application retrieves within a unit of work.
在目标表行上保持更新锁定。
在装载数据时它并不使用FOR update子句,所以行并不会被锁定。
It will not use a FOR UPDATE clause when loading the data, so the rows will not be locked.
悲观锁定策略的前提是,另一个用户很可能试图修改您正在修改的某个表行。
A pessimistic locking strategy assumes that the probability is high that another user will try to modify the same row in a table that you are changing.
在导出操作期间,行级别锁定应用于导出表(exportingtable),这意味着一次只持有一个锁。
During an export operation, row-level locking is applied to the exporting table, which means that only one lock is held at a time.
您可以(也应该)使用相同的四行代码锁定delete和update闭包。
You can (and should) lock down the delete and update closures with the same four lines of code.
与图1类似,事务 1(TX1)在读balance值 1000 时并没有锁定数据库的行。
Similar to Figure 1, Transaction 1 (Tx1) reads the balance value as 1000 without locking the row in the database.
(但其他事务可读取锁定行)。
下面是关于DB 2如何访问和锁定行的一个常见误解。
The following is a common misunderstanding of how DB2 accesses and locks rows.
CS:在游标定位在任何一行中时,锁定这个被应用程序的某个事务访问的行。
CS: Locks any row accessed by a transaction of an application while the cursor is positioned on the row.
锁定的另一个特例是需要锁定当前数据库行中不存在的项目。
Another special case of locking is the need to lock something where currently no database row exists.
不管数据行是否被提交,以及根据语句的谓词它是否被排除,对于索引扫描和表访问都执行这样的锁定操作。
This locking was done for both index scans and table access whether or not the row of data was committed or whether it would have been excluded based on the statement's predicates.
我们的第一个主要问题是,当我们想要一行的内容时,我们会扫描整个账单表,并锁定我们读取的每一行。
Our first major problem is that we are scanning the full bills table every time we want a row out of it and locking every row we read.
如果此代码在执行c 3行后且在完成该构造函数前被另一个线程中断,则双重检查锁定就会失败。
If this code is interrupted by another thread after executing line C3 but before completing the constructor, double-checked locking fails.
应用推荐