US 9,811,581 B2
Policy based automatic physical schema management
Lynette D. Adayilamuriyil, Olathe, KS (US); Marco Greco, Staines (GB); John F. Miller, III, Lake Oswego, OR (US); Raghupathi K. Murthy, Union City, CA (US); and Sitaram Vemulapalli, San Jose, CA (US)
Assigned to International Business Machines Corporation, Armonk, NY (US)
Filed by International Business Machines Corporation, Armonk, NY (US)
Filed on Jun. 13, 2014, as Appl. No. 14/304,698.
Application 14/304,698 is a continuation of application No. 14/051,260, filed on Oct. 10, 2013.
Prior Publication US 2015/0106375 A1, Apr. 16, 2015
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 17/30 (2006.01)
CPC G06F 17/30595 (2013.01) [G06F 17/30292 (2013.01); G06F 17/30339 (2013.01)] 7 Claims
OG exemplary drawing
 
1. A method, comprising:
receiving, with a processor of a computer, a data partitioning policy for data in a set of partitions for a table, wherein the data partitioning policy identifies a condition for automatically implementing the data partitioning policy, wherein the data partitioning policy is described in a statement that includes a rolling partitions clause that specifies a quantity of partitions to keep for the table and a limit to clause that indicates a maximum size of the table;
in response to the condition occurring, determining one of that a number of the partitions in the set of partitions for the table exceeds the specified quantity and that a total storage allocated to the table exceeds the maximum size; and
performing an operation on at least one partition to modify the set of partitions, wherein, when the operation is for detachment,
for the rolling partitions clause, performing the operation for detachment until the specified quantity of the partitions to keep for the table is met by selecting the at least one partition that holds a lowest set of values; and
for the limit to clause, performing the operation for detachment until the maximum size is met by selecting one of an interval partition and a range partition based on:
in response to an ANY clause being specified with the limit to clause, selecting one of the interval partition and the range partition holding the lowest set of values;
in response to an INTERVAL ONLY clause being specified in the limit to clause, selecting the interval partition; and
in response to an INTERVAL FIRST clause being specified with the limit to clause, selecting the interval partition before selecting the range partition.