Back to results
US 9,177,004 B2Granted
Balancing data across partitions of a table space during load processing
AssigneeBMC Software, Inc.
InventorRandol K. Bright
Life of this patent
Estimating the term…
Abstract
A balancing technique allows a database administrator to perform a mass data load into a relational database employing partitioned tablespaces. The technique automatically balances the usage of the partitions in a tablespace as the data is loaded. Previous definitions of the partitions are modified after the loading of the data into the tablespace to conform with the data loaded into the tablespace.
Claims19
A method comprising:
- receiving a request to load data into a plurality of partitions of a table of a relational database of a computer system;
- reading a plurality of data records, each data record having a key value;
- loading the plurality of data records evenly across the plurality of partitions by:
- sorting the plurality of data records by key value,
- after the sorting, determining a quantity of records of the plurality of data records to be loaded into each partition of the plurality of partitions by dividing a count of the plurality of data records by a count of the plurality of partitions, and
- writing the plurality of data records into the plurality of partitions, without regard to currently defined key value limits for the plurality of partitions, so that each partition includes the quantity of data records;
- and
- in response to loading the plurality of data records, modifying the currently defined key value limits for the plurality of partitions by:
- selecting the partition with a highest partition number,
- setting the key value limit for the selected partition, comprising:
- setting the key value limit for the selected partition to a highest key value stored in the selected partition, and
- selecting the partition with a next lower partition number, and
- repeating the act of setting the key value limit for the selected partition for all remaining partitions of the plurality of partitions.
10 more elements
A method comprising
- receiving a request to load data into a plurality of partitions of a table of a relational database of a computer system;
- reading a plurality of data records, each data record having a key value;
- loading the plurality of data records evenly across the plurality of partitions by:
- sorting the plurality of data records by key value,
- after the sorting, determining a quantity of records of the plurality of data records to be loaded into each partition of the plurality of partitions, and
- writing the plurality of data records into the plurality of partitions, without regard to currently defined key value limits for the plurality of partitions, so that each partition includes the quantity of data records;
- and
- in response to loading the plurality of data records, modifying the currently defined key value limits for the plurality of partitions by:
- selecting a partition of the plurality of partitions,
- setting the key value limit of the selected partition using a lowest key value stored in an adjacent partition to the selected partition,
- selecting a previously unselected partition of the plurality of partitions, and
- repeating the act of setting the key value limit of the selected partition and the act of selecting an unselected partition of the plurality of partitions for all remaining partitions of the plurality of partitions so that a pre-existing order of the key value limits is preserved.
9 more elements
A computer system, comprising:
- a processor;
- a first datastore;
- a database, stored in the first datastore, comprising:
- a tablespace, comprising:
- a plurality of partitions configured to store data records, each data record having a key value;
- and
- a plurality of key value limits, each associated with a partition of the plurality of partitions, wherein the key values of the data records stored in each partition of the plurality of partitions are no greater than the associated key value limit;
- a data record source, operatively coupled to the processor;
- and
- a program datastore, operatively coupled to the processor, configured to hold programs that when executed, cause the processor to perform acts comprising:
- receiving a request to load data into the plurality of partitions;
- reading a plurality of data records from the data record source, each data record having a key value;
- sorting the plurality of data records by key value,
- after the sorting, determining a quantity of records of the plurality of data records to be loaded into each partition of the plurality of partitions by dividing a count of the plurality of data records by a count of the plurality of partitions, and
- writing the data records into the plurality of partitions, without regard to currently defined key value limits for the plurality of partitions, so that each partition includes the quantity of data records;
- and
- in response to writing the plurality of data records into the plurality of partitions, modifying the currently defined key value limits by:
- selecting a partition of the plurality of partitions,
- setting the key value limit for the selected partition, preserving a pre-existing order of the key value limits of the plurality of partitions,
- selecting a previously unselected partition of the plurality of partitions, and
- repeating the act of setting the key value limit for the selected partition and selecting another previously unselected partition for all remaining partitions of the plurality of partitions.
18 more elements
Dependencies are inferred from the claim text.