摘要:
Disclosed is a mechanism, system, interface, and process to allow specification of a new table decoration clause to obtain one or more past version of one or more data items. The version query provides for a direct interface to get multiple versions of the row(s). In addition, information about the past versions can be retrieved and displayed along with the past versions. Also disclosed are algorithms, mechanisms, and processes that are employed to implement a query upon past versions. In one approach, the version query can be defined as either “rowid”-based access or non-rowid based access. With rowid based access, a given rowid is used to identify the data for which past versions are desired. Also disclosed is a process for determining one or more life intervals when given a key.
摘要:
A database server stores compressed units in data blocks of a database. A table (or data from a plurality of rows thereof) is first compressed into a “compression unit” using any of a wide variety of compression techniques. The compression unit is then stored in one or more data block rows across one or more data blocks. As a result, a single data block row may comprise compressed data for a plurality of table rows, as encoded within the compression unit. Storage of compression units in data blocks maintains compatibility with existing data block-based databases, thus allowing the use of compression units in preexisting databases without modification to the underlying format of the database. The compression units may, for example, co-exist with uncompressed tables. Various techniques allow a database server to optimize access to data in the compression unit, so that the compression is virtually transparent to the user.
摘要:
Performing an operation directly on data stored in a database table provides for avoiding generation and processing of SQL statements. A Data Layer interface, comprising a set of APIs, allows internal database server components to call directly to the Data Layer for making fast row changes to a table. According to an embodiment, before making any row change to a table through this Data Layer interface, a shared state data structure is created to hold the metadata about the table. A single shared state can be used for all DML changes to a particular table regardless of what columns are updated or inserted during each DML operation. When a process needs to change a row, the process uses a mutable state based on the shared state of the table.
摘要:
An array update operation which specifies number of (row-identifier, value) pairs for updating rows in a table of a database is implemented as follows. A block-identifier of a block (on disk) that holds a row identified by a row-identifier in a specified pair is looked up using a database index, and the block-identifier thus found is stored in a structure. Use of a row-identifier to look up the corresponding block-identifier, and the storage of the block-identifier in the structure are repeatedly performed, for each of several specified pairs. Next, a vector read is performed, to read and store in a cache, each block identified by a block-identifier in the structure, and all the blocks that have been read are stored in the cache during a single function call. Thereafter, rows identified in specified pairs are modified, in blocks currently in the cache, using the values in the specified pairs.
摘要:
A method and apparatus for proactively allocating space to a logical layer of a database is provided. Allocation of space to a logical layer of a database is an expensive operation that should be minimized. The allocation of space includes discovering free space in all the higher layers in the logical storage hierarchy. It also includes cross-domain system calls and cleansing disk-write operations. In prior approaches, the allocation processes were triggered on-demand, only a certain logical layer was discovered to be at full capacity when an insert-row operation was attempted. In one embodiment of the invention, space needs are statistically predicted based on prior rates of space consumption. The database server pre-allocates space as needed, based on the statistical predictions. Rates of consumption are examined periodically. Space is pre-allocated before any logical layer reaches full capacity by a combination of proactive background processes; foreground-triggered, background processes; and classic foreground allocation.
摘要:
A method and apparatus for updating databases are disclosed. In response to a flashback request, a database object is restored to a state as of a specified flashback time. The changes introduced into the database object are reversed in a sequence starting with a change introduced into the database object immediately before issuance of the flashback request and ending with a change introduced into the database object immediately after the specified flashback time.
摘要:
Disclosed is a system and method for implementing space management for large objects stored in the computing system. According to some approaches, storage of large objects are managed by dynamically creating contiguous chunks of storage space of varying lengths. The length of each chunk may vary depending upon object size being stored, fragmentation of the storage space, available free space, and/or expected length of the object.
摘要:
A method and apparatus for proactively allocating space to a logical layer of a database is provided. Allocation of space to a logical layer of a database is an expensive operation that should be minimized. The allocation of space includes discovering free space in all the higher layers in the logical storage hierarchy. It also includes cross-domain system calls and cleansing disk-write operations. In prior approaches, the allocation processes were triggered on-demand, only a certain logical layer was discovered to be at full capacity when an insert-row operation was attempted. In one embodiment of the invention, space needs are statistically predicted based on prior rates of space consumption. The database server pre-allocates space as needed, based on the statistical predictions. Rates of consumption are examined periodically. Space is pre-allocated before any logical layer reaches full capacity by a combination of proactive background processes; foreground-triggered, background processes; and classic foreground allocation.
摘要:
A method and apparatus for selective removal of user data changes is provided. In one embodiment, the methodology is implemented by a logical recovery mechanism. Upon receiving a request to selectively remove user data changes stored in a database, the mechanism creates an empty set of transactions to be populated for selective removal, identifies one or more transactions and places them in the causal set of transactions. The mechanism further identifies other transactions that logically depend on any transaction already in the causal set of transactions. Finally, either while the causal set of transactions is being identified or after the identification is completed, the mechanism also determines user data changes made by the causal set of transactions. One or more compensating transactions may be generated by the logical recovery mechanism, which when executed, reverse the user data changes.
摘要:
A technique for making versions of rows of a user-defined tracked table temporally queryable. The database management system of the technique permits temporal queries of user-defined tables. The queries return versions of rows in the user-defined table that are currently in an undo log maintained by the database system. Associated with the tracked table are a system history table which contains versions of the rows and temporal metadata indicating when the versions were in the tracked table and a system form history table which contains versions of the form of the tracked table and metadata indicating when the tracked table had the form. These tables are created and maintained by a background process in the database management system. A temporal query on the tracked table combines results from the undo log with results from the system history table. The results' form is determined by the system form history table.