Patent ID: 7917512

Claim:
A method for recommending range-partitioned tables in a relational database, said method comprising the steps of: obtaining a workload specification for said database, said workload specification detailing specific queries and a frequency of execution of each of said queries; obtaining a catalog specification for said database, said catalog specification detailing a definition of tables and columns within said tables; obtaining a set of partitions for said database; identifying, based at least in part on said obtaining steps, a plurality of candidate ones of said tables for said database, said candidate ones of said tables having a plurality of candidate ones of said columns, wherein identifying a plurality of candidate tables for said database comprises: selecting a set of said columns on which said tables of said database are suitable to be partitioned, based on said catalog specification; based on said workload, selecting a most frequently occurring set of said columns; identifying an intersection of (i) said set of said columns on which said tables of said database are suitable to be partitioned and (ii) said most frequently occurring set of said columns; and identifying said candidate columns for each of said candidate tables, from said intersection; allocating at least one chosen column for each of said candidate ones of said tables, to obtain a set of partitioned tables and a set of appropriate partitions for each of said partitioned tables, wherein said step of allocating at least one chosen column for each of said candidate tables is based at least on extracting natural ranges present in said workload, and wherein said step of allocating at least one chosen column for each of said tables comprises finding actual data to reside in each of said partitions, so that execution of said workload is enhanced, said finding of said actual data being based upon said candidate columns and said set of partitions; estimating query workload execution costs, wherein said execution of said workload is optimized based on minimizing said query workload execution cost, wherein said step of estimating query workload execution costs comprises: creating an upper triangular matrix A, said matrix A storing a number of rows in each of a plurality of different sub-sets of cells, an entry A[i,j] in said matrix A representing a number of rows present in a partition formed of cells i to j; creating an upper triangular matrix B, said matrix B storing a number of queries in said workload that access a given one of said partitions; and computing a cost matrix wherein cost of a given partition is given by multiplying corresponding entries in said matrix A and said matrix B; and employing a recurrence relation to compute said appropriate partitions, based on said cost matrix.