Patent ID: 7080074

Claim:
A method for reducing lock contention of concurrent transactions on a plurality of rows of a table in a relational data base system in response to a database query having a set of predicates, the method comprising the steps of: (a) scanning all rows of the table within an access range determined by the query, wherein the scanning step (a) further comprising the step of: (a1) accessing the rows of the table with uncommitted read semantics, wherein the accessing is performed through any current locks on the rows; (b) evaluating each scanned row to determine whether the row satisfies the set of predicates, wherein the step of evaluating (b) includes (b1) determining that a particular row does not satisfy the set of predicates of the query; (b2) skipping the particular row, including skipping the particular row when a lock is currently held on the particular row and an update on the particular row has not yet committed while the lock is held, and continuing the scan; and (b3) determining that a specific row satisfies the set of predicates of the query and returning the specific row, wherein the step of returning the specific row further comprises requesting a lock on the specific row that satisfies the set of predicates; suspending the scan, if the requested lock is refused; repeating the request for a lock and re-evaluating the specific row when the lock is permitted; and returning the specific row if the specific row still satisfies the set of predicates of the query.