通常Web应用程序有页锁和行锁。
行锁定,具有到表锁的升级。
该锁是与正在被导出的行相关联的行锁。
That lock is the row lock that is associated with the row being exported.
当获得少量的行锁时,行锁就会自动地逐渐升级为表锁。
After some small number of row locks are obtained, a lock escalation to a table lock will occur automatically.
必须是SQL字符串中选择“锁定行”表和地方的行锁。
Must be a SQL string that selects a row in the "LOCKS" table and places a lock on the row.
挂起是由表EMPLOYEE上一个独占式的行锁导致的。
The hang is caused by an exclusive row lock on table EMPLOYEE.
上述比较表明,使用表锁而不是行锁可以节省大约3%的耗时。
The above comparison shows that causing table locks to be used instead of row locks saved about 3% in elapsed time.
g代表“granted”,意即事务句柄为2的事务拥有行锁。
G stands for "granted" and means that the transaction with transaction handle 2 owns the row lock.
利用分配给DB 2服务器的内存,DB 2无法维护大量的行锁。
DB2 was unable to maintain a large number of row locks with the memory allocated to the DB2 server.
数据库引擎将选择相应的锁,并且可以将锁从行锁或页锁升级到表锁。
The Database Engine chooses the appropriate lock and can escalate the lock from a row or page lock to a table lock.
由于我们没有操控锁,因此引擎在需要一行(或者页)时会对其进行锁定。
Since we are not manipulating locks ourselves, the engine is locking each row (or page) as it needs it.
如果一个事务获得了一行的行锁,那么这个事务同时获得了相关的表的锁。
If a transaction obtains a row lock for a row, the transaction also acquires a table lock for the corresponding table.
通过使用这种方法,在对行执行选择、更新或删除操作期间,不会持有行锁。
With this approach, no locks are held between selecting and updating, or deleting a row.
如果用一个表锁替换这些行锁,将不再会超出maxlocks值,那么锁升级就会停止。
If after replacing these with a single table lock, the MAXLOCKS value is no longer exceeded, lock escalation stops.
数据库管理器通过查看应用程序的锁列表并查找行锁最多的表,来决定对哪些锁进行升级。
The database manager determines which locks to escalate by looking through the lock list for the application and finding the table with the most row locks.
在目标页中对该行进行格式化,并获得该行上的一个X(exclusive,独占的)行锁。
The row is formatted in the target page and an X (exclusive) row lock is obtained on it.
锁维护空间不足可能会导致所谓的“锁提升”,其中,行锁被提升为不必要的表锁,这甚至可能会导致死锁情况。
Shortages in the lock maintenance space can lead to so-called lock escalations, in which row locks are escalated to undesirable table locks, which can even lead to deadlock situations.
如果一个并发连接的应用程序碰巧持有不兼容的行锁,那么import工具就会暂停,直到该应用程序提交或回滚其事务。
If a concurrently connected application happens to be holding an incompatible row lock, the import utility pauses until that application commits or rolls back its transaction.
对于mdc表,选择BLOCKINSERT可以提高INSERT操作的性能,因为使用的是块级的锁,避免了为INSERT操作使用行锁。
For MDC tables, the selection of BLOCKINSERT may improve the performance of INSERT operations by locking at the block level and avoiding row locks for INSERT operations.
这些nextkey锁只有在keyINSERT发现带有RepeatableRead (RR)隔离级别的扫描器在索引中的next -higher键上有一个行锁时才能获得。
These next key locks are only obtained when the key INSERT finds that a scanner with a Repeatable Read (RR) isolation level has a row lock on the next-higher key in the index.
等待的事务(列Sts中显示 “W”(“wait”)的事务)是句柄为 6 的事务。 该事务正在与事务 2 请求同一个行上的 X 锁。
The waiting transaction (state W = "wait" in column Sts) is the transaction with handle 6.
第四行以超出锁的次数、用户线程或者缓存数来开始(通常所有的0会是这样)。
The fourth line starts with the number of times we have exceeded locks, user threads or buffers (all 0 and should generally be so).
图表中的每一行指的是一个不同的锁。
IDS允许应用程序开发人员将锁放在不同的对象上,如数据库、表、页或行、以及索引。
IDS allows application developers to place locks on different objects, like databases, tables, pages or rows, and indexes.
对于每个新行之上的锁,惟一可以替代的是表锁(DB 2中没有页锁)。
The only alternative to a lock on every new row is a table lock (since there are no page locks in DB2).
并发控制支持表级和行级锁。
乐观事务锁不能用于在单个update语句中更新数据行集合,因此在这种情况下,很难进行错误处理。
Optimistic transaction locking should not be used to update sets of rows in a single update statement, as error handling in this case is very difficult.
支持表级和行级锁。
即使另一个并发会话持有一个独占式行级锁,它仍然返回最近提交的行。
It returns the most recently committed version of the rows, even if another concurrent session holds an exclusive row-level lock.
并且由于每一行都被存储在固定的位置,使得锁升级这样的技术得以实现,以避免过多细粒度锁。
And the location of every row is in a fixed location, allowing for techniques such as lock escalation when too many fine-grained locks would otherwise be needed.
应用推荐