Row Level Locking For Columnar Data
AssigneeOracle International Corporation
InventorsVineet Marwah, Teck Hua Lee, Amit Ganesh
Life of this patent
Estimating the term…
Abstract
Row locking is performed at the row level of granularity for database data stored in columnar form. Row level locking entails use of a lock vector that is stored in a compression unit in a data block, the compression unit storing rows in columnar-major format. On an as needed basis, the lock vector is expanded to identify more transactions affecting the rows in the compression unit.
Claims20
A method comprising steps of:
- storing a plurality of rows in a plurality of data blocks in column-major format;
- and
- locking said plurality of rows at a row-level of granularity, wherein locking said plurality of rows at a row-level of granularity includes:
- a first transaction obtaining a lock on a first row having at least one column value of a column in a particular data block of said plurality of data blocks;
- and
- while said first transaction holds said lock on said first row, a second transaction obtaining a lock on a second row having at least one column value of said column in said particular data block.
A method comprising steps of:
- storing a plurality of rows in a plurality of data blocks in column-major format, wherein each data block of said plurality of data blocks includes a variable lock vector that is used to identify one or more transactions having a lock on a row in said each data block;
- and
- locking a plurality of rows at a row-level of granularity within a particular data block of said plurality of data blocks, said particular data block containing a particular variable lock vector, wherein locking said plurality of rows at a row-level of granularity includes:
- setting a first sequence of bits in said variable lock vector to a first value to lock a first row in said particular data block for a first transaction;
- and
- while said first transaction holds said lock on said first row, setting a second sequence of bits in said variable lock vector to a second value to lock a second row in said data block for a second transaction.
One or more non-transitory storage media storing instructions which, when executed by one or more computing devices, cause performance of steps:
- storing a plurality of rows in a plurality of data blocks in column-major format;
- locking said plurality of rows at a row-level of granularity, wherein locking said plurality of rows at a row-level of granularity includes:
- a first transaction obtaining a lock on a first row having at least one column value of a column in a particular data block of said plurality of data blocks;
- and
- while said first transaction holds said lock on said first row, a second transaction obtaining a lock on a second row having at least one column value of said column in said particular data block.
One or more non-transitory storage media comprising steps of:
- storing a plurality of rows in a plurality of data blocks in column-major format, wherein each data block of said plurality of data blocks includes a variable lock vector that is used to identify one or more transactions having a lock on a row in said each data block;
- and
- locking a plurality of rows at a row-level of granularity within a particular data block of said plurality of data blocks, said particular data block containing a particular variable lock vector, wherein locking said plurality of rows at a row-level of granularity includes:
- setting said a first sequence of bits in said variable lock vector to a first value to lock a first row in said particular data block for a first transaction;
- and
- while said first transaction holds said lock on said first row, setting a second sequence of bits in said variable lock vector to a second value to lock a second row in said data block for a second transaction.
Dependencies are inferred from the claim text.