Patent ID: 11907263
Assignee: ORACLE INTERNATIONAL CORPORATION
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 10:
11. One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause:
automatically measuring for each column of a plurality of columns in a plurality of rows:
a respective frequency of statements that filter the column in a plurality of database statements,
a respective count of distinct values used for filtration on the column in each statement in the plurality of database statements,
a respective frequency of each respective count of distinct values used for filtration on the column in the plurality of database statements, and
a respective value range of the column for each storage zone of a plurality of storage zones, wherein each storage zone in the plurality of storage zones contains a respective disjoint subset of the plurality of rows;

randomly selecting a sampled subset of the plurality of rows;
measuring a respective efficiency for each interleaved sort of a plurality of distinct interleaved sorts, wherein:
each column of the plurality of columns contains a respective value for each row in the sampled subset of the plurality of rows,
the interleaved sort has a respective distinct subset of the plurality of columns,
the interleaved sort is based on a plurality of portions of each value of said values for each row in the sampled subset of the plurality of rows in each column of the respective disjoint subset of the plurality of columns of the interleaved sort, and
the measuring the respective efficiency is based on: a) said respective frequencies of statements, b) said respective value ranges of the plurality of columns for each storage zone of a plurality of storage zones, and c) said respective frequencies of each respective count of distinct values;

measuring a new efficiency based on a best interleaved sort of a plurality of distinct interleaved sorts that has a highest efficiency and said respective value ranges of the plurality of columns, excluding a particular column of the plurality of columns;
generating, when the new efficiency exceeds a threshold, a mapping from each column of the plurality of columns, excluding the particular column, to said respective value ranges of the column; and
sorting the plurality of rows based on said mapping that excludes the particular column.