Bhaskar Ghosh - Burlingame CA, US Rafi Ahmed - Fremont CA, US Hermann Baer - San Mateo CA, US
Assignee:
Oracle International Corporation - Redwood Shores CA
International Classification:
G06F 7/00 G06F 17/30
US Classification:
707 3, 707 1, 707 2, 707 4, 707 5, 707 10
Abstract:
Various techniques are described for processing database commands that include MINUS and/or INTERSECT operators. According to one technique, the database server executes the MINUS/INTERSECT in a specialized rowsource in parallel. In one approach, the specialized rowsource implements a sort merge-join like solution, where: a DISTINCT SORT is performed on each input, a left and right pointer is maintained on the respective input streams of tuples, the left or right pointer is incremented based on whether there is a match between the tuples pointed-to by the pointers, and the tuple of the left side is returned (or not returned) based on whether there is a match. Techniques are described for generating multiple query plans for executing a query, where each of the query plans includes a plan portion for executing, in parallel, the operation associated with a MINUS/INTERSECT operator. Cost estimates are generated for the query plans. The database server selects from the query plans a particular query plan to execute based, at least in part, on the cost estimates.
Multi-Tiered Query Processing Techniques For Minus And Intersect Operators
Bhaskar Ghosh - Burlingame CA, US Rafi Ahmed - Fremont CA, US Hermann Baer - San Mateo CA, US
Assignee:
Oracle International Corporation - Redwood Shores CA
International Classification:
G06F 7/00 G06F 17/30
US Classification:
707713, 707718, 707719
Abstract:
Various techniques are described for processing database commands that include MINUS and/or INTERSECT operators. The queries containing the MINUS and/or INTERSECT operators are transformed to create a plurality of transformed queries. Each of the transformed queries produces the same result as the original query, but does not include the MINUS and/or INTERSECT operator. To achieve the same result set as the original query, the transformed queries employ equijoins, antijoins, and/or semijoins, and duplicate elimination operations. Costs are estimated for each of the various transformed queries. Based on the cost estimates, one of the transformed queries is selected as the query that is to be executed to perform the operations specified in the original query.
- Redwood Shores CA, US George Eadon - Hollis NH, US Ramesh Kumar - San Francisco CA, US Hermann Baer - San Mateo CA, US Suresh Sridharan - San Francisco CA, US
International Classification:
G06F 16/21
Abstract:
Techniques are provided for moving data between partitions. Such a process may be performed without requiring any locks that block transactions that target a partition from being executed. Instead, such transactions may proceed while a move operation is being performed. The move operation involves copying data from the targeted partition to another partition that is hidden from (or “invisible” to) those transactions that attempt to read from or write to the partition. During the move operation, changes that are made to the partition are also reflected in a journal. Eventually, the changes reflected in the journal are drained and applied to the hidden partition. Once the partition and the hidden partition are synchronized, the identities of the partitions are swapped so that future transactions will target the previously-hidden partition instead of the previously-viewable partition.
- Redwood Shores CA, US George Eadon - Hollis NH, US Ramesh Kumar - San Francisco CA, US Hermann Baer - San Mateo CA, US Suresh Sridharan - San Francisco CA, US
International Classification:
G06F 17/30
Abstract:
Techniques are provided for moving data between partitions. Such a process may be performed without requiring any locks that block transactions that target a partition from being executed. Instead, such transactions may proceed while a move operation is being performed. The move operation involves copying data from the targeted partition to another partition that is hidden from (or “invisible” to) those transactions that attempt to read from or write to the partition. During the move operation, changes that are made to the partition are also reflected in a journal. Eventually, the changes reflected in the journal are drained and applied to the hidden partition. Once the partition and the hidden partition are synchronized, the identities of the partitions are swapped so that future transactions will target the previously-hidden partition instead of the previously-viewable partition.
- Redwood Shores CA, US George Eadon - Hollis NH, US Ramesh Kumar - San Francisco CA, US Hermann Baer - San Mateo CA, US Suresh Sridharan - San Francisco CA, US
Assignee:
Oracle International Corporation - Redwood Shores CA
International Classification:
G06F 17/30
Abstract:
Techniques are provided for moving data between partitions. Such a process may be performed without requiring any locks that block transactions that target a partition from being executed. Instead, such transactions may proceed while a move operation is being performed. The move operation involves copying data from the targeted partition to another partition that is hidden from (or “invisible” to) those transactions that attempt to read from or write to the partition. During the move operation, changes that are made to the partition are also reflected in a journal. Eventually, the changes reflected in the journal are drained and applied to the hidden partition. Once the partition and the hidden partition are synchronized, the identities of the partitions are swapped so that future transactions will target the previously-hidden partition instead of the previously-viewable partition.
- Redwood Shores CA, US George Eadon - Hollis NH, US Ramesh Kumar - San Francisco CA, US Hermann Baer - San Mateo CA, US Suresh Sridharan - San Francisco CA, US
Assignee:
Oracle International Corporation - Redwood Shores CA
International Classification:
G06F 17/30
Abstract:
Techniques for creating and using partial indexes are provided. A partial index is an index that indexes one or more partitions of a partitioned table and does not index one or more other partitions of the partitioned table. Thus, if a partition of a partitioned table is rarely used, then an index may index all other partitions of the partitioned table or at least only those partitions that are written to or read from relatively frequently. Also, in preparation for loading data into a partition, indexing for the partition may be “turned off”, effectively making a full index a partial index. While the data is loaded into the partition, the partial index is still available for query processing. After the data is loaded into the partition, indexing for the partition is “turned on”, which causes the data in the partition to be indexed by the partial index.
Asynchronous Global Index Maintenance During Partition Maintenance
- Redwood Shores CA, US George Eadon - Hollis NH, US Ramesh Kumar - Foster City CA, US Hermann Baer - San Mateo CA, US Suresh Sridharan - San Francisco CA, US
Assignee:
Oracle International Corporation - Redwood Shores CA
International Classification:
G06F 17/30 G06F 9/46
Abstract:
Techniques for maintaining a global index in response to a partition being dropped are provided. In response to an instruction to drop a partition, partition identification data that identifies the partition is stored. Index entries, in the global index, that correspond to the dropped partition become “orphaned” entries. Later, an execution plan for a query is processed, where the execution plan targets a global index. During execution of the execution plan, one or more index entries are accessed. For each accessed index entry, the partition identification data is analyzed to determine if the index entry is an orphaned entry. If so, then the index entry is ignored for purposes of the query. Later, the global index may be updated to delete each orphaned entry. Such deletion may occur much later, such as during a time when the database is not queried or updated frequently.