Patent ID: 7480653

Claim:
A method for controlling concurrency of access to data in a database system having a database engine, data manager and database, the method comprising: providing for enabling and indexing of selective partition locking of a table; partitioning the table in the database system into a plurality of partitions; receiving a lock request having one or more statements for access to data in the database system, the lock request being a request for a page lock or a row lock for a corresponding row or page in the database system containing the data; determining a minimum lock state for each statement of the request; wherein the determining a minimum lock state for each statements of the request further comprises creating one or more control blocks for a called operation in relation to the one or more statements and copying to the one or more control blocks in relation to the table, one or more of: state of a selective partition locking, selected locking granularity, a lockmax value; identifying a partition of the plurality of partitions that contains the row or the page in the database system containing the data; associating the lock request with a partition lock on the partition that contains the row or the page in the database system containing the data, partition lock selectively locking the partition at a the minimum lock state that permits serialized access to data in the partition; and serially accessing the data in the partition using the partition lock, responsive to the data being committed at a time of receiving the lock request, accessing the data without using the partition lock, wherein locking by the partition lock is avoided.