摘要:
A method, apparatus and article of manufacture, implementing the method, for operating a database management system stores information in at least one entry. Each entry is associated with a row. At least one entry comprises one or more columns. At least one of the columns has a varying length. At least one entry comprises an offset array having one or more offsets associated with the columns having the varying length. In another aspect of the invention, a column extraction table is built and used, with the offset array, to access a specified column of an entry. Alternately, code is generated to access a specified column based on the offset array of an entry. In yet another aspect of the invention, a comparison table is built and used, with the offset array, to compare subsets of the entries.
摘要:
A method, system and program for accessing records in a database object, such as an index or table. A cursor is maintained that points to a start entry in the database object. The database object has rows and columns of values. A runtime component receives a command to return a kth entry in the object having column values that satisfy predicates in a query statement. The runtime component calls a manager component that accesses entries in the database object to return the kth entry in the object having column values that satisfy the predicates. The manager component moves the cursor through sequential entries in the database object, in either the forward or reverse direction, until a kth entry that satisfies the predicates from the start entry is reached. The manager component positions the cursor to an entry that is the kth entry that satisfies the predicates from the start entry and returns data from the kth entry pointed to by the cursor to the runtime component.
摘要:
Provided is a system, method, and program for performing a reverse scan of an index implemented as a tree of pages. Each leaf page includes one or more ordered index keys and previous and next pointers to the previous and next pages, respectively. The scan is searching for keys in the leaf pages that satisfy the search criteria. If a current index key is a first key on a current page, then a request is made for a conditional shared latch on a previous page prior to the current page. If the requested conditional shared latch is not granted, then the latch on the current page is released and a request is made for unconditional latches on the previous page and the current page. After receiving the latches on the previous and current pages, a determination is made of whether the current index key is on the current page if the current page was modified since the unconditional latch was requested. The current index key is located on the current page if the current index key is on the current page. A determination is then made of whether the located current index key satisfies the search criteria.