×

Hierarchical database compression and query processing

  • US 9,928,267 B2
  • Filed: 06/13/2014
  • Issued: 03/27/2018
  • Est. Priority Date: 06/13/2014
  • Status: Active Grant
First Claim
Patent Images

1. A method for hierarchical database compression, comprising:

  • applying, by a database management unit, a first level of a first type of compression to a first partition of a column of a database and storing data generated from applying the first level of the first type of compression to the first partition in a memory buffer external to the database; and

    applying, by the database management unit, a second level of the first type of compression to a subset of the data, wherein the first level of the first type of compression comprises a first first-level dictionary and the second level of the first type of compression comprises a first second-level dictionary, and wherein a code size of the first first-level dictionary is larger than a code size of the first second-level dictionary, wherein applying the second level of the first type of compression further comprises;

    adding a first data entry to a set of data corresponding to a page of the database;

    determining an amount of space saved by applying the second level of the first type of compression to the set of data;

    determining a size of the first second-level dictionary corresponding to the first type of compression;

    based on determining that the amount of space is larger than the size of the first second-level dictionary, adding a second data entry to the set of data corresponding to the page;

    determining, based on the adding of the second data entry to the set of data, that there is a change to at least one of size of the first second-level dictionary and the code size of the first second-level dictionary;

    calculating a size of the page based on the determined change;

    determining that the page is full based on the calculated size of the page;

    removing the second data entry from the set of data corresponding to the page;

    applying the second level of the first type of compression without the determined change to the set of data corresponding to the page;

    performing predicate evaluation on the subset of the first partition by converting a predicate value into a compressed predicate value using the first first-level dictionary and the first second-level dictionary, and comparing the predicate value directly to compressed data in the subset of the first partition, wherein the compressed data is compressed using the first level and the second level of the first type of compression;

    performing join/groupby processing on the subset of the first partition by converting of second-level codes to first-level codes using the first second-level dictionary, and performing the join/groupby processing on the first-level codes; and

    performing expression evaluation on the subset of the first partition by converting second-level codes to uncompressed data using the first first-level dictionary and the first second-level dictionary.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×