Relational method for transforming unsorted sparse dictionary encodings into unsorted-dense or sorted -dense dictionary encodings
AssigneeOracle International Corporation
InventorsPit Fender, Felix Schmidt, Benjamin Schlegel
Life of this patent
Estimating the term…
Abstract
Unsorted sparse dictionary encodings are transformed into unsorted-dense or sorted-dense dictionary encodings. Sparse domain codes have large gaps between codes that are adjacent in order. Unlike spare codes, dense codes have smaller gaps between adjacent codes; consecutive codes are dense codes that have no gaps between adjacent codes. The techniques described herein are relational approaches that may be used to generate sparse composite codes and sorted codes.
Claims18
A method of encoding a base table by a multi-node database management system (DBMS), comprising:
- from a base table that contains a token column, generating a sparsely-encoded table, wherein said token column contains a plurality of tokens and a plurality of distinct tokens, said plurality of distinct tokens containing a subset of distinct of tokens, each subset of distinct tokens being mutually exclusive;
- wherein said sparsely-encoded table contains a plurality of sparse composite codes in a sparse composite code column, each sparse composite code including a local code corresponding to a distinct token of said plurality of tokens and a node identifier identifying a node of said multi-node DBMS;
- wherein generating said sparsely-encoded table includes, for each node of said multi-node DBMS, said each node generating said local codes that identify said each node in a local column for rows of said sparsely-encoded table that hold, in said token column, a respective subset of distinct tokens of said each node;
- generating an NDV table comprising NDV rows, each NDV row of said NDV rows identifying a respective node of said multi-node DBMS and a corresponding number of distinct values in the respective node;
- based on the NDV table, generating an offset table comprising offset rows, each offset row of said offset rows identifying a respective node of said multi-node DBMS and an offset that exclusively covers the number of distinct values corresponding to the respective node of the said each offset row;
- generating a sparse-to-dense table based on said offset table, said sparse-to-dense table including a dense code column containing a plurality of dense codes, each dense code of said plurality of dense codes corresponding to a distinct token of said plurality of distinct tokens;
- encoding the token column based on the sparse-to-dense table.
One or more non-transitory computer-readable media storing sequences instructions for encoding a base table by a multi-node database management system (DBMS), wherein said sequences of instructions, when executed by one or more processors, cause:
- from a base table that contains a token column, generating a sparsely-encoded table, wherein said token column contains a plurality of tokens and a plurality of distinct tokens, said plurality of distinct tokens containing a subset of distinct of tokens, each subset of distinct tokens being mutually exclusive;
- wherein said sparsely-encoded table contains a plurality of sparse composite codes in a sparse composite code column, each sparse composite code including a local code corresponding to a distinct token of said plurality of tokens and a node identifier identifying a node of said multi-node DBMS;
- wherein generating said sparsely-encoded table includes, for each node of said multi-node DBMS, said each node generating said local codes that identify said each node in a local column for rows of said sparsely-encoded table that hold, in said token column, a respective subset of distinct tokens of said each node;
- generating an NDV table comprising NDV rows, each NDV row of said NDV rows identifying a respective node of said multi-node DBMS and a corresponding number of distinct values in the respective node;
- based on the NDV table, generating an offset table comprising offset rows, each offset row of said offset rows identifying a respective node of said multi-node DBMS and an offset that exclusively covers the number of distinct values corresponding to the respective node of the said each offset row;
- generating a sparse-to-dense table based on said offset table, said sparse-to-dense table including a dense code column containing a plurality of dense codes, each dense code of said plurality of dense codes corresponding to a distinct token of said plurality of distinct tokens;
- encoding the token column based on the sparse-to-dense table.
A multi-node database management system (DBMS), wherein said DBMS is configured for:
- from a base table that contains a token column, generating a sparsely-encoded table, wherein said token column contains a plurality of tokens and a plurality of distinct tokens, said plurality of distinct tokens containing a subset of distinct of tokens, each subset of distinct tokens being mutually exclusive;
- wherein said sparsely-encoded table contains a plurality of sparse composite codes in a sparse composite code column, each sparse composite code including a local code corresponding to a distinct token of said plurality of tokens and a node identifier identifying a node of said multi-node DBMS;
- wherein generating said sparsely-encoded table includes, for each node of said multi-node DBMS, said each node generating said local codes that identify said each node in a local column for rows of said sparsely-encoded table that hold, in said token column, a respective subset of distinct tokens of said each node;
- generating an NDV table comprising NDV rows, each NDV row of said NDV rows identifying a respective node of said multi-node DBMS and a corresponding number of distinct values in the respective node;
- based on the NDV table, generating an offset table comprising offset rows, each offset row of said offset rows identifying a respective node of said multi-node DBMS and an offset that exclusively covers the number of distinct values corresponding to the respective node of the said each offset row;
- generating a sparse-to-dense table based on said offset table, said sparse-to-dense table including a dense code column containing a plurality of dense codes, each dense code of said plurality of dense codes corresponding to a distinct token of said plurality of distinct tokens;
- encoding the token column based on the sparse-to-dense table.
Dependencies are inferred from the claim text.