Patent ID: 8356060

Claim:
A method comprising: prior to storing a set of data in a table, performing the steps of: performing a plurality of tests on a subset of data from the set of data to determine compression ratios produced by applying each of a plurality of compression techniques to the subset of data; based, at least in part, on the compression ratios produced by each of the plurality of compression techniques, selecting a particular compression technique to apply to the set of data; compressing the set of data using the particular compression technique to produce compressed data; and storing the compressed data in the table; wherein the method is performed by one or more computing devices; wherein the table has a plurality of columns; wherein the set of data includes a plurality of rows; wherein performing the plurality of tests includes performing a first test in which the plurality of rows are ordered according to a first ordering; and performing a second test in which the plurality of rows are ordered according to a second ordering that is different than the first ordering; wherein, in the first test, the plurality of rows are sorted based on a first column of the plurality of columns, wherein the first test applies a particular sequence of one or more compression techniques to data for the first column of the plurality of columns; and wherein, in the second test, the plurality of rows are sorted based on a second column of the plurality of columns, wherein the second test applies said particular sequence of one or more compression techniques to the data for the first column of the plurality of columns.