IP Library Granted Patent US 9,177,004
Granted Patent B2
US 9,177,004 · App. 12/626,109 · Granted Nov 3, 2015

Balancing data across partitions of a table space during load processing

Inventor: Randol K. Bright (Austin, TX)
Assignee: BMC SOFTWARE, INC.
G06F17/30339G06F17/30306
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,177,004
App. No.
12/626,109
Granted
Nov 3, 2015
Kind
B2
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.

Claims (73)

1. 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.

2. The method of claim 1 , further comprising counting the plurality of data records as they are read.

3. 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.

4. The method of claim 3 , wherein the act of modifying the currently defined key value limits further includes:

for a partition with a highest partition number, setting the key value limit to a highest key value of a data record stored in the partition with the highest partition number.

5. The method of claim 3 , wherein setting the key value limit of the selected partition using the lowest key value stored in the next partition comprises:

setting the key value limit to a predecessor value of the lowest key value of a data record stored in the adjacent partition of the plurality of partitions.

6. The method of claim of claim 3 , wherein the act of setting the key value limit for the selected partition comprises:

setting the key value limit to a value between a highest key value of a data record stored in the selected partition and a lowest key value of a data record stored in the adjacent partition of the plurality of partitions.

7. A non-transitory computer readable storage device with instructions for a computer system stored thereon wherein the instructions cause the computer system to perform the method of claim 1 .

8. A networked computer system comprising:

a plurality of computers communicatively coupled, at least one of the plurality of computers programmed to perform at least a portion of the method of claim 1 wherein the entire method of claim 1 is performed collectively by the plurality of computers.

9. 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.

10. The computer system of claim 9 , wherein setting the key value limit of the selected partition comprises:

determining a highest key value of a data record distributed into the selected partition of the plurality of partitions; and

setting the key value limit for the selected partition to the highest key value.

11. The computer system of claim 9 , wherein setting the key value limit of the selected partition comprises:

determining a lowest key value of a data record distributed into an adjacent partition of the selected partition; and

setting the key value limit for the selected partition of the plurality of partitions based on the lowest key value.

12. The computer system of claim 11 , wherein setting the key value limit of the selected partition comprises:

setting the key value limit to a predecessor value of the lowest key value.

13. The computer system of claim 11 , wherein setting the key value limit for the selected partition comprises:

setting the key value limit to a value between a highest key value of a data record stored in the selected partition and the lowest key value of the data record stored in the adjacent partition.

14. The computer system of claim 11 , wherein modifying the key value limits for each partition further includes:

for a last partition, setting the key value limit to a highest key value of a data record stored in the last partition.

15. The computer system of claim 11 , wherein the key values are monotonically decreasing and the adjacent partition is a predecessor partition.

16. The computer system of claim 9 , wherein reading the plurality of data records includes counting the plurality of data records as they are read.

17. A non-transitory computer readable storage device with instructions for a computer system stored thereon wherein the instructions cause the computer system to perform the method of claim 3 .

18. The method of claim of claim 3 , wherein the key values of the data records are monotonically decreasing and the adjacent partition is a predecessor partition.

19. The method of claim of claim 1 , further comprising:

determining whether a difference between a first updated limit key of a first partition and a second updated limit key of a successor partition is less than a predetermined value; and

rolling back the writing of the records when the difference is less than the predetermined value, so that the database is restored to a state prior to loading the plurality of data records.

Assignments (14)
GRANT OF FIRST LIEN SECURITY INTEREST IN PATENT RIGHTS Recorded Nov 13, 2024
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: GOLDMAN SACHS BANK USA, AS COLLATERAL AGENT
Reel/Frame 069352/0628 →
GRANT OF SECOND LIEN SECURITY INTEREST IN PATENT RIGHTS Recorded Nov 13, 2024
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: GOLDMAN SACHS BANK USA, AS COLLATERAL AGENT
Reel/Frame 069352/0568 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (052854/0139) Recorded Aug 6, 2024
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.
Reel/Frame 068339/0617 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (052844/0646) Recorded Aug 6, 2024
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.
Reel/Frame 068339/0408 →
OMNIBUS ASSIGNMENT OF SECURITY INTERESTS IN PATENT COLLATERAL Recorded Mar 4, 2024
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS RESIGNING COLLATERAL AGENT
To: GOLDMAN SACHS BANK USA, AS SUCCESSOR COLLATERAL AGENT
Reel/Frame 066729/0889 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENTS Recorded Feb 1, 2024
From: ALTER DOMUS (US) LLC
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.
Reel/Frame 066567/0283 →
GRANT OF SECOND LIEN SECURITY INTEREST IN PATENT RIGHTS Recorded Sep 30, 2021
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: ALTER DOMUS (US) LLC
Reel/Frame 057683/0582 →
SECURITY INTEREST Recorded Jun 4, 2020
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 052844/0646 →
SECURITY INTEREST Recorded Jun 4, 2020
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 052854/0139 →
RELEASE OF PATENTS Recorded Oct 5, 2018
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: BMC SOFTWARE, INC.; BLADELOGIC, INC.; BMC ACQUISITION L.L.C.
Reel/Frame 047198/0468 →
SECURITY INTEREST Recorded Oct 2, 2018
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: CREDIT SUISSE, AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 047185/0744 →
SECURITY INTEREST Recorded Jul 27, 2017
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 043351/0189 →
SECURITY AGREEMENT Recorded Sep 11, 2013
From: BMC SOFTWARE, INC.; BLADELOGIC, INC.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 031204/0225 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 25, 2009
From: BRIGHT, RANDOL K.
To: BMC SOFTWARE, INC.
Reel/Frame 023571/0822 →
Continuity (1)
Related Publication 20110125745A1 · May 26, 2011