Index page with latch-free access
First Claim
1. A computer-implemented method, comprising:
- receiving a request from a read query to access one or more records of a database table implementing an index on one or more columns of the table, wherein the index comprises an index page that includes a slot array and a header comprising an update pointer;
locating one or more updates prepended to the index page by locating a most recently prepended update indicated by the update pointer;
generating a local offset table with entries updates in the slot array and the located one or more updates;
determining an isolation level that indicates whether the read query is precluded from accessing new prepended updates received after the read query; and
providing latch-free access to the one or more records to the read query from the local offset table based on the isolation level, wherein an update query has concurrent access to the one or more records;
while performing the accessing, concurrently applying an update from an update query by prepending the update to the located one or more updates;
determining to regenerate the local offset table for the read query based on the isolation level and information of each prepended update; and
maintaining the generated local offset table when the isolation level precludes reading the prepended update or records requested by the read access are absent from the information,wherein at least one of the receiving, locating, generating, and accessing are performed by one or more computers.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed herein are system, method, and computer program product embodiments for providing read queries latch-free access to an index page. In an embodiment, a processor receives a request from a read query to access one or more records of an index page. The index page includes an update pointer and a slot array. The processor locates one or more updates prepended to the index page by locating a most recently prepended update indicated by the update pointer. Then, the processor generates a local offset table with entries in the slot array and the located one or more updates. The generated local offset table enables the processor to provide the read query access to the one or more records of the index page.
-
Citations
16 Claims
-
1. A computer-implemented method, comprising:
-
receiving a request from a read query to access one or more records of a database table implementing an index on one or more columns of the table, wherein the index comprises an index page that includes a slot array and a header comprising an update pointer; locating one or more updates prepended to the index page by locating a most recently prepended update indicated by the update pointer; generating a local offset table with entries updates in the slot array and the located one or more updates; determining an isolation level that indicates whether the read query is precluded from accessing new prepended updates received after the read query; and providing latch-free access to the one or more records to the read query from the local offset table based on the isolation level, wherein an update query has concurrent access to the one or more records; while performing the accessing, concurrently applying an update from an update query by prepending the update to the located one or more updates; determining to regenerate the local offset table for the read query based on the isolation level and information of each prepended update; and maintaining the generated local offset table when the isolation level precludes reading the prepended update or records requested by the read access are absent from the information, wherein at least one of the receiving, locating, generating, and accessing are performed by one or more computers. - View Dependent Claims (2, 3, 4, 5, 6, 7, 14, 15, 16)
-
-
8. A system, comprising:
-
a memory; and at least one processor coupled to the memory and configured to; receive a request from a read query to access one or more records of a database table implementing an index on one or more columns of the table, wherein the index comprises an index page that includes a slot array and a header comprising an update pointer; locate one or more updates prepended to the index page by locating a most recently prepended update indicated by the update pointer; generate a local offset table with entries in the slot array and the located one or more updates; determine an isolation level that indicates whether the read query is precluded from accessing new prepended updates received after the read query; and provide latch-free access to the one or more records to the read query from the local offset table based on the isolation level, wherein an update query has concurrent access to the one or more records; while performing the accessing, concurrently applying an update from an update query by prependinq the update to the located one or more updates; determine to regenerate the local offset table for the read query based on the isolation level and information of each prepended update; and maintain the generated local offset table when the isolation level precludes reading the prepended update or records requested by the read access are absent from the information. - View Dependent Claims (9, 10, 11)
-
-
12. A tangible computer-readable device having instructions stored thereon that, when executed by at least one computing device, causes the at least one computing device to perform operations comprising:
-
receiving a request from a read query to access one or more records of a database table implementing an index on one or more columns of the table, wherein the index comprises an index page that includes a slot array and a header comprising an update pointer; locating one or more updates prepended to the index page by locating a most recently prepended update indicated by the update pointer; generating a local offset table with entries in the slot array and the located one or more updates; determining an isolation level that indicates whether the read query is precluded from accessing new prepended updates received after the read query; providing latch-free access to the one or more records to the read query from the local offset table based on the isolation level, wherein an update query has concurrent access to the one or more records; while performing the accessing, concurrently applying an update from an update query by prepending the update to the located one or more updates; determining to regenerate the local offset table for the read query based on the isolation level and information of each prepended update; and maintaining the generated local offset table when the isolation level precludes reading the prepended update or records requested by the read access are absent from the information. - View Dependent Claims (13)
-
Specification