IP Library Granted Patent US 9,817,856
Granted Patent B2
US 9,817,856 · App. 14/463,060 · Granted Nov 14, 2017

Dynamic range partitioning

Inventors: Christian Bensberg (Heidelberg, DE); Jochen Becker (Haseluenne, DE); Carsten Mueller (Bruschal, DE); Andreas Thumfart (Heidelberg, DE)
Assignee: SAP SE
G06F17/30339
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,817,856
App. No.
14/463,060
Granted
Nov 14, 2017
Kind
B2
Abstract

A system includes generation of a definition of a table including a partitioning column of the table and a threshold size, allocation of a first memory partition for the table, determination that a size of the records of the table in the first memory partition is greater than the threshold size, and, in response to the determination that the size of the records of the table in the first memory partition is greater than the threshold size, determination that a maximum value of the partitioning column in the records of the table in the first memory partition, determination of a minimum value of the partitioning column in the records of the table in the first memory partition, generation of metadata indicating that records of the table in which the value of the partitioning column is in a range between and including the minimum value and the maximum value are stored in the first memory partition, and allocation of a second memory partition for the table.

Claims (112)

1. A system comprising:

a data storage device storing a database table;

a computing device comprising:

a memory storing processor-executable program code; and

a processor to execute the processor-executable program code in order to cause the computing device to:

generate a definition of a table including a partitioning column of the table and a threshold size;

allocate a first default memory partition for the table;

store a plurality of records of the table in the first memory partition wherein each of the plurality of records is associated with a respective monotonously-growing value that is stored in the partitioning column;

determine that a size of the records of the table in the first memory partition is greater than the threshold size;

in response to the determination that the size of the records of the table in the first default memory partition is greater than the threshold size, (i) determine a maximum value of the respective monotonously-growing value of the partitioning column in the records of the table in the first memory partition, (ii) determine a minimum value of the respective monotonously-growing value of the partitioning column in the records of the table in the first memory partition, (iii) generate metadata indicating that records of the table in which the value of the partitioning column is in a range between and including the minimum value and the maximum value are stored in the first default memory partition, and (iv) allocate a second default memory partition for the table;

after allocation of the second default memory partition for the table, receiving a new record that includes a value of the partitioning column that is between the maximum value and the minimum value associated with the first default memory partition; and

storing the new record in the first default memory partition.

2. A system according to claim 1 , wherein the processor is further to execute the processor-executable program code in order to cause the computing device to:

receive a first record to store in the table;

determine that a value of the partitioning column in the first record is not in the range;

store the first record in the second default memory partition; and

determine that a size of the records of the table in the second memory partition is not greater than the threshold size.

3. A system according to claim 2 , wherein the processor is further to execute the processor-executable program code in order to cause the computing device to:

receive a second record to store in the table;

determine that a value of the partitioning column in the second record is not in the range;

store the second record in the second default memory partition; and

determine that a size of the records of the table in the second memory partition is greater than the threshold size; and

in response to the determination that the size of the records of the table in the second memory partition is greater than the threshold size,

determine a second maximum value of the respective monotonously-growing value of the partitioning column in the records of the table in the second default memory partition;

determine a second minimum value of the respective monotonously-growing value of the partitioning column in the records of the table in the second default memory partition;

generate metadata indicating that records of the table in which the value of the partitioning column is in a second range between and including the second minimum value and the second maximum value are stored in the second default memory partition; and

allocate a third default memory partition for the table.

4. A system according to claim 3 , wherein the processor is further to execute the processor-executable program code in order to cause the computing device to:

receive a third record to store in the table;

determine that a value of the partitioning column in the third record is not in the range or in the second range;

store the third record in the third default memory partition; and

determine that a size of the records of the table in the third memory partition is not greater than the threshold size.

5. A system according to claim 1 , wherein the processor is further to execute the processor-executable program code in order to cause the computing device to:

receive a first record to store in the table;

determine that a value of the partitioning column in the first record is in the range; and

store the first record in the first default memory partition.

6. A non-transitory computer-readable medium storing program code, the program code executable by a processor of a computing system to cause the computing system to:

generate a definition of a table including a partitioning column of the table and a threshold size;

allocate a first memory partition for the table;

store a plurality of records of the table in the first memory partition wherein each of the plurality of records is associated with a respective monotonously-growing value that is stored in the partitioning column;

determine that a size of the records of the table in the first memory partition is greater than the threshold size; and

in response to the determination that the size of the records of the table in the first memory partition is greater than the threshold size,

determine a maximum value of the respective monotonously-growing value of the partitioning column in the records of the table in the first memory partition;

determine a minimum value of the respective monotonously-growing value of the partitioning column in the records of the table in the first memory partition;

generate metadata indicating that records of the table in which the value of the partitioning column is in a range between and including the minimum value and the maximum value are stored in the first memory partition;

allocate a second memory partition for the table;

after allocation of the second default memory partition for the table, receiving a new record that includes a value of the partitioning column that is between the maximum value and the minimum value associated with the first default memory partition; and

storing the new record in the first default memory partition.

7. A medium according to claim 6 , wherein the processor is further to execute the processor-executable program code in order to cause the computing device to:

receive a first record to store in the table;

determine that a value of the partitioning column in the first record is not in the range;

store the first record in the second memory partition; and

determine that a size of the records of the table in the second memory partition is not greater than the threshold size.

8. A medium according to claim 7 , wherein the processor is further to execute the processor-executable program code in order to cause the computing device to:

receive a second record to store in the table;

determine that a value of the partitioning column in the second record is not in the range;

store the second record in the second memory partition; and

determine that a size of the records of the table in the second memory partition is greater than the threshold size; and

in response to the determination that the size of the records of the table in the second memory partition is greater than the threshold size,

determine a second maximum value of the respective monotonously-growing value of the partitioning column in the records of the table in the second memory partition;

determine a second minimum value of the respective monotonously-growing value of the partitioning column in the records of the table in the second memory partition;

generate metadata indicating that records of the table in which the value of the partitioning column is in a second range between and including the second minimum value and the second maximum value are stored in the second memory partition; and

allocate a third memory partition for the table.

9. A medium according to claim 8 , wherein the processor is further to execute the processor-executable program code in order to cause the computing device to:

receive a third record to store in the table;

determine that a value of the partitioning column in the third record is not in the range or in the second range;

store the third record in the third memory partition; and

determine that a size of the records of the table in the third memory partition is not greater than the threshold size.

10. A medium according to claim 6 , wherein the processor is further to execute the processor-executable program code in order to cause the computing device to:

receive a first record to store in the table;

determine that a value of the partitioning column in the first record is in the range; and

store the first record in the first memory partition.

11. A computer-implemented method comprising:

generating a definition of a table including a partitioning column of the table and a threshold size;

allocating a first memory partition for the table;

storing a plurality of records of the table in the first memory partition wherein each of the plurality of records is associated with a respective monotonously-growing value that is stored in the partitioning column;

determining that a size of the records of the table in the first memory partition is greater than the threshold size; and

in response to the determination that the size of the records of the table in the first memory partition is greater than the threshold size,

determining a maximum value of the respective monotonously-growing value of the partitioning column in the records of the table in the first memory partition;

determining a minimum value of the respective monotonously-growing value of the partitioning column in the records of the table in the first memory partition;

generating metadata indicating that records of the table in which the value of the partitioning column is in a range between and including the minimum value and the maximum value are stored in the first memory partition;

allocating a second memory partition for the table;

after allocation of the second default memory partition for the table, receiving a new record that includes a value of the partitioning column that is between the maximum value and the minimum value associated with the first default memory partition; and

storing the new record in the first default memory partition.

12. A method according to claim 11 , further comprising:

receiving a first record to store in the table;

determining that a value of the partitioning column in the first record is not in the range;

storing the first record in the second memory partition; and

determining that a size of the records of the table in the second memory partition is not greater than the threshold size.

13. A method according to claim 12 , further comprising:

receiving a second record to store in the table;

determining that a value of the partitioning column in the second record is not in the range;

storing the second record in the second memory partition; and

determining that a size of the records of the table in the second memory partition is greater than the threshold size; and

in response to the determination that the size of the records of the table in the second memory partition is greater than the threshold size,

determining a second maximum value of the respective monotonously-growing value of the partitioning column in the records of the table in the second memory partition;

determining a second minimum value of the respective monotonously-growing value of the partitioning column in the records of the table in the second memory partition;

generating metadata indicating that records of the table in which the value of the partitioning column is in a second range between and including the second minimum value and the second maximum value are stored in the second memory partition; and

allocating a third memory partition for the table.

14. A method according to claim 13 , further comprising:

receiving a third record to store in the table;

determining that a value of the partitioning column in the third record is not in the range or in the second range;

storing the third record in the third memory partition; and

determining that a size of the records of the table in the third memory partition is not greater than the threshold size.

15. A method according to claim 11 , further comprising:

receiving a first record to store in the table;

determining that a value of the partitioning column in the first record is in the range; and

storing the first record in the first memory partition.

16. The system of claim 1 , wherein the threshold size is measured in gigabytes.

17. The system of claim 1 , wherein the threshold size is measured in a number of records.

18. The system of claim 1 , wherein the monotonously-growing value is a document number.

19. The system of claim 1 , wherein the monotonously-growing value is a transaction number.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 19, 2014
From: BENSBERG, CHRISTIAN; BECKER, JOCHEN; MUELLER, CARSTEN; THUMFART, ANDREAS
To: SAP SE
Reel/Frame 033566/0753 →
Continuity (1)
Related Publication 20160055192A1 · Feb 25, 2016