Patent ID: 11971856
Assignee: SNOWFLAKE INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 8:
9. A non-transitory machine-readable medium that stores instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
accessing a first operation for a table of a database the first operation for the table comprising a filter on a first column of the table, the table being stored in a plurality of micro-partitions, a first micro-partition of the plurality of micro-partitions of the table being compressed according to a first compression algorithm and a second micro-partition of the plurality of micro-partitions of the table being compressed according to a second compression algorithm;
receiving a query comprising multiple filters comprising the filter;
selecting whether to apply the filter within the database or by a central server, the selecting whether to apply the filter being performed on a filter-by-filter basis for each of the multiple filters, wherein a first filter is applied by the database and a second filter is applied by the central server;
in response to selecting to apply the filter within the database, transmitting the query comprising the filter to the database;
in response to selecting to apply the filter by the central server, transmitting a request for unfiltered data from the database and applying the filter to the unfiltered data received from the database, the request excluding the filter;
decompressing, in the first micro-partition, the first column of the table excluding decompressing other columns of the table in the first micro-partition;
decompressing, based on the filter on the first column, rows of the first micro-partition of the table that contains data responsive to the filter excluding decompressing other rows of the first micro-partition of the table that contains data not responsive to the filter;
providing, in response to the first operation for the table, the decompressed rows of the first micro-partition;
accessing a second operation for the table, the second operation comprising determining a second computation result on the first column of the table;
computing, for a first entry in the rows of the first micro-partition, the first computation result on a first value of the first column of the first entry;
storing the first computation result for the first entry in conjunction with a first compressed value for the first entry; and
based on a second compressed value for a second entry of the table being identical to the first compressed value for the first entry, storing the first computation result as the second computation result instead of computing the second computation result using the second compressed value for the second entry.