# US 2021/0081453 A1 · Autonomously partitioning database tables

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

- Number: US 2021/0081453 A1
- Document ID: US20210081453A1
- Status: Published application
- Kind: A1
- Application number: 16/948,303
- Filed: 2020-09-11
- Published: 2021-03-18
- Earliest claimed: 2019-09-12
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: George EADON; Ramesh KUMAR; Ananth RAGHAVAN
- Web page: https://patentgrep.com/patent/US20210081453A1

## CPC

- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F 16/9017: {using directory or table look-up (use of a directory or look-up table in file systems G06F16/13)}
- G06F 16/217: {Database tuning (G06F16/2282 takes precedence; database performance monitoring G06F11/3409)}
- G06F 16/90335: {Query processing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

What is disclosed is an improved approach to perform automatic partitioning, without requiring any expertise on the part of the user. A three stage processing pipeline is provided to generate candidate partition schemes, to evaluate the candidate using real table structures that are empty, and to then implement a selected scheme with production data for evaluation. In addition, an improved approach is described to perform automatic interval partitioning, where the inventive concept implements interval partitioning that does not impose these implicit constraints on the partition key column.

## Claims

### Claim 1

A method, comprising:
generating candidate partition schemes for a database table;
creating empty partitions for at least some of the candidate partition schemes;
synthesizing statistics for the empty partitions; and
evaluating the candidate partition schemes to identify a selected partition scheme.

### Claim 2 (depends on 1)

The method of claim 1, further comprising implementing the selected partition scheme in a production database environment and running a production workload against a partitioned table in the production database environment.

### Claim 3 (depends on 1)

The method of claim 1, wherein the candidate partition schemes are generated by:
identifying a query in the production workload;
analyzing the query to identify predicate data for the query;
using the predicate data and cardinality data to identify the candidate partition schemes; and
scoring the candidate partition schemes to select one or more of the candidate partition schemes.

### Claim 4 (depends on 3)

The method of claim 3, wherein scoring of the candidate partition schemes is based upon a number of predicates corresponding to each of the candidate partition schemes.

### Claim 5 (depends on 1)

The method of claim 1, wherein filtering is applied to remove one or more possible candidate partition schemes based upon cardinality data.

### Claim 6 (depends on 1)

The method of claim 1, wherein the statistics are synthesized by querying the database table and analyzing query results to determine a number of rows from the database that would be associated with specific partitions for the candidate partition schemes.

### Claim 7 (depends on 1)

The method of claim 1, wherein interval partitioning is logically implemented as one of the candidate partition schemes, where list partitioning is an underlying storage structure for the interval partitioning.

### Claim 8 (depends on 7)

The method of claim 7, wherein the interval partitioning is implemented using a virtual column that holds a canonical partition key that maps to the list partitioning.

### Claim 9

A system for partitioning in a database system, comprising:
a processor;
a memory for holding programmable code; and
wherein the programmable code includes instructions executable by the processor for generating candidate partition schemes for a database table; creating empty partitions for at least some of the candidate partition schemes; synthesizing statistics for the empty partitions; and evaluating the candidate partition schemes to identify a selected partition scheme.

### Claim 10 (depends on 9)

The system of claim 9, wherein the programmable code further comprises instructions for implementing the selected partition scheme in a production database environment and running a production workload against a partitioned table in the production database environment.

### Claim 11 (depends on 9)

The system of claim 9, wherein the programmable code further comprises instructions for generating the candidate partition schemes by:
identifying a query in the production workload;
analyzing the query to identify predicate data for the query;
using the predicate data and cardinality data to identify the candidate partition schemes; and
scoring the candidate partition schemes to select one or more of the candidate partition schemes.

### Claim 12 (depends on 11)

The system of claim 11, wherein scoring of the candidate partition schemes is based upon a number of predicates corresponding to each of the candidate partition schemes.

### Claim 13 (depends on 9)

The system of claim 9, wherein filtering is applied to remove one or more possible candidate partition schemes based upon cardinality data.

### Claim 14 (depends on 9)

The system of claim 9, wherein the statistics are synthesized by querying the database table and analyzing query results to determine a number of rows from the database that would be associated with specific partitions for the candidate partition schemes.

### Claim 15 (depends on 9)

The system of claim 9, wherein interval partitioning is logically implemented as one of the candidate partition schemes, where list partitioning is an underlying storage structure for the interval partitioning.

### Claim 16 (depends on 15)

The system of claim 15, wherein the interval partitioning is implemented using a virtual column that holds a canonical partition key that maps to the list partitioning.

### Claim 17

A computer program product embodied on a computer readable medium, the computer readable medium having stored thereon a sequence of instructions which, when executed by a processor, executes a method for implementing partitions in a database system comprising:
generating candidate partition schemes for a database table;
creating empty partitions for at least some of the candidate partition schemes;
synthesizing statistics for the empty partitions; and
evaluating the candidate partition schemes to identify a selected partition scheme.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the computer program product further comprises instructions for implementing the selected partition scheme in a production database environment and running a production workload against a partitioned table in the production database environment.

### Claim 19 (depends on 17)

The computer program product of claim 17, wherein the computer program product further comprises instructions for generating the candidate partition schemes by:
identifying a query in the production workload;
analyzing the query to identify predicate data for the query;
using the predicate data and cardinality data to identify the candidate partition schemes; and
scoring the candidate partition schemes to select one or more of the candidate partition schemes.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein scoring of the candidate partition schemes is based upon a number of predicates corresponding to each of the candidate partition schemes.

### Claim 21 (depends on 17)

The computer program product of claim 17, wherein filtering is applied to remove one or more possible candidate partition schemes based upon cardinality data.

### Claim 22 (depends on 17)

The computer program product of claim 17, wherein the statistics are synthesized by querying the database table and analyzing query results to determine a number of rows from the database that would be associated with specific partitions for the candidate partition schemes.

### Claim 23 (depends on 17)

The computer program product of claim 17, wherein interval partitioning is logically implemented as one of the candidate partition schemes, where list partitioning is an underlying storage structure for the interval partitioning.

### Claim 24 (depends on 23)

The computer program product of claim 23, wherein the interval partitioning is implemented using a virtual column that holds a canonical partition key that maps to the list partitioning.

### Claim 25

A method, comprising:
identifying a table to implement with range partitioning;
creating a list partition structure to hold data for the table;
generating a logical representation of the range partitioning for the table; and
mapping between the list partition structure and the logical representation of the range partitioning for the table.

### Claim 26 (depends on 25)

The method of claim 25, wherein a virtual column is included in the logical representation of the range partitioning for the table, wherein the virtual column comprises stores a key value for a range-based partition, which represents a canonical value for a given interval that is used to identify a list partition.
