# US 2009/0276603 A1 · Techniques for efficient dataloads into partitioned tables

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2009/0276603 A1
- Document ID: US20090276603A1
- Status: Published application
- Kind: A1
- Application number: 12/114,197
- Filed: 2008-05-02
- Published: 2009-11-05
- Earliest claimed: 2008-05-02
- Assignees: Oracle International Corporation
- Inventors: Prakash Menon; Swati Iyengar
- Web page: https://patentgrep.com/patent/US20090276603A1

## CPC

- G06F 16/24556: {Aggregation; Duplicate elimination}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for efficiently loading data into a partition of a partitioned table of a database are provided. Data is stored in a swap table and the high water mark of the swap table has been reset prior to storing the data. The swap table is swapped with the partition. After the swap, the swap table becomes the partition of the partitioned table and the partition of the partitioned table becomes the swap table, and the swap table is truncated to reset the high water mark of the swap table.

## Claims

### Claim 1

A method for loading data comprising:
collecting data from a first set of one or more data sources;
storing the data from the first set of one or more data sources in a swap table, wherein prior to storing the data from the first set of one or more data sources the swap table contains no data and the high water mark of the swap table has been reset to reflect that the swap table contains no data;
swapping the swap table with a first partition of a partitioned table, wherein swapping the swap table with the first partition results in the swap table becoming the first partition of the partitioned table and the first partition prior to the swap becoming the swap table after the swap; and
truncating, after the swapping, the swap table to reset the high water mark for the swap table.

### Claim 2 (depends on 1)

The method of claim 1, wherein swapping the swap table with the first partition results in a high water mark of the swap table being set to a high water mark of the first partition prior to swapping and results in the high water mark of the partition being set to the high water mark of the swap table prior to the swapping.

### Claim 3 (depends on 2)

The method of claim 2, wherein truncating the swap table after the swapping results in the high water mark of the swap table being set to zero.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
determining whether the swap table exists; and
creating the swap table if the swap table does not already exist.

### Claim 5 (depends on 1)

The method of claim 1, wherein the partitioned table comprises multiple partitions, the method further comprising:
collecting, after the truncating, data from a second set of one or more data sources;
storing, after the collecting data from a second set of one or more data sources, the data from the second set of one or more data sources to the swap table;
swapping the swap table with a second partition from the one or more partitions of the report data table; and
truncating, after the swapping of the swap table with the second partition, the swap table to reset the high water mark for the swap table.

### Claim 6

A system comprising:
a partitioned table comprising one or more data partitions, wherein each data partition in the one or more data partitions is used to store data collected from a set of one or more data sources;
a first data collector configured to:
collect data from a first set of one or more data sources; and
insert the data from the first set of one or more data sources to a swap table, wherein prior to storing the data from the first set of one or more data sources the swap table contains no data and the high water mark of the swap table has been reset to reflect that the swap table contains no data; and
a scheduler configured to execute tasks at predetermined intervals, the scheduler configured to:
swap the swap table with a first partition of the partitioned table, wherein swapping the swap table with the first partition results in the swap table becoming the first partition of the partitioned table and the first partition prior to the swap becoming the swap table after the swap; and
truncate, after the swapping, the swap table to reset the high water mark for the swap table.

### Claim 7 (depends on 6)

The method of claim 6, wherein swapping the swap table with the first partition results in a high water mark of the swap table being set to a high water mark of the first partition prior to swapping and results in the high water mark of the partition being set to the high water mark of the swap table prior to the swapping.

### Claim 8 (depends on 7)

The method of claim 7, wherein truncating the swap table after the swapping results in the high water mark of the swap table being set to zero.

### Claim 9 (depends on 6)

The system of claim 6, wherein the scheduler is further configured to determine whether the swap table exists and to create the swap table if the swap table does not exist.

### Claim 10 (depends on 9)

The system of claim 9, wherein the logic to determine whether the first swap table exists includes logic to identify the first swap table using an identifier associated with the first data collector.

### Claim 11 (depends on 6)

The system of claim 6, further comprising:
a data collector definitions table, the data collection definitions table providing definitions of data collectors to be executed by the scheduler.

### Claim 12 (depends on 11)

The system of claim 11, wherein the data collector definitions table includes an entry for the first data collector.

### Claim 13 (depends on 12)

The system of claim 12, wherein the data collector definitions table includes an entry for a second data collector;
wherein the second data collector is configured to:
collect report data of a second set of one or more data sources; and
storing the data from the second set of one or more data sources in the swap table, wherein prior to storing the data from the first set of one or more data sources the swap table contains no data and the high water mark of the swap table has been reset to reflect that the swap table contains no data; and
wherein the scheduler is configured to:
execute the second data collector;
swap the swap table with a second partition of the partitioned table; and
truncate, after the swapping, the swap table to reset the high water mark for the swap table.

### Claim 14 (depends on 6)

The system of claim 6, wherein swapping the swap table with the first partition results in a high water mark of the swap table being set to a high water mark of the first partition prior to swapping and results in the high water mark of the first partition being set to the high water mark of the swap table prior to the swapping.

### Claim 15 (depends on 14)

The system of claim 14, wherein truncating the swap table to delete data formerly in the first partition results in the high water mark of the swap table being set to zero.

### Claim 16

A computer readable medium storing a plurality of instructions for controlling a data processor to perform one or more tasks, the plurality instructions comprising:
an instruction that causes the data processor to collect data from a first set of one or more data sources;
an instruction that causes the data processor to store the data from the first set of one or more data sources in a swap table, wherein prior to storing the data from the first set of one or more data sources the swap table contains no data and the high water mark of the swap table has been reset to reflect that the swap table contains no data;
an instruction that causes the data processor to swap the swap table with a first partition of a partitioned table, wherein swapping the swap table with the first partition results in the swap table becoming the first partition of the partitioned table and the first partition prior to the swap becoming the swap table after the swap; and
an instruction that causes the data processor to truncate, after the swapping, the swap table to reset the high water mark for the swap table.

### Claim 17 (depends on 16)

The computer readable medium of claim 16, wherein executing the instruction that causes the data processor to swap the swap table with the first partition results in a high water mark of the swap table being set to a high water mark of the first partition prior to swapping and results in the high water mark of the partition being set to the high water mark of the swap table prior to the swapping.

### Claim 18 (depends on 17)

The computer readable medium of claim 17, wherein executing the instruction to truncate the swap table after the swapping results in the high water mark of the swap table being set to zero.

### Claim 19 (depends on 16)

The computer readable medium of claim 16, further comprising:
an instruction that causes the data processor to determine whether the swap table exists; and
an instruction that causes the data processor to create the swap table if the swap table does not already exist.

### Claim 20 (depends on 16)

The computer readable medium of claim 16, further comprising:
an instruction that causes the data processor to collect, after executing the instruction to truncate, data from a second set of one or more data sources;
an instruction that causes the data processor to store, after executing the instruction to collect data from a second set of one or more data sources, the data from the second set of one or more data sources to the swap table;
an instruction that causes the data processor to swap the swap table with a second partition from the one or more partitions of the report data table; and
an instruction that causes the data processor to truncate, after executing the instruction to swap of the swap table with the second partition, the swap table to reset the high water mark for the swap table.
