Dynamic joining of database tables
AssigneeTeradata US, Inc.
InventorsSanjib Mishra, Rama Krishna Korlapati
Life of this patent
Estimating the term…
Abstract
Disclosed are systems and methods for dynamic joining of database tables. The systems and methods can include: selecting a first table from a plurality of tables; selecting a second table from the plurality of tables; joining the first table and the second table to create a temporary table; and storing, in a memory of a computing device, the temporary table and the temporary skew value. The first table can have a first skew value. The second table can have a second skew value. The second skew value can be similar to the first skew value. The temporary table can have a temporary skew value.
Claims14
A method comprising:
- locating a hash code of skew values for each of a plurality of tables, each hash code of skew a values related to a skew value for a corresponding table of the plurality of tables,
- selecting, by a computing device including a processor, a first table from the plurality of tables based on a located first hash code for the first table, the first table having a first skew value represented by the first hash code;
- selecting, by the computing device, a second table from the plurality of tables based on a located second hash code for the second table, the second table having a second skew value represented by the second hash code, the second skew value being similar to the first skew value;
- joining, by the computing device, the first table and the second table based on the first and second hash codes to create a temporary table, the temporary table having a temporary skew value;
- determining skew statistics for the temporary table, wherein the skew statistics include a row count a number of distinct values, and hashes of high mode values and their corresponding frequency of columns of interest;
- and
- storing, in a memory of the computing device, the temporary table, the temporary skew value, and the determined skew statistics.
A system comprising:
- a processor;
- and
- a memory that stores instructions that, when executed by the processor, cause the processor to perform operations comprising:
- locating a hash code of skew values for each of a plurality of tables, each hash code of skew a values related to a skew value for a corresponding table of the plurality of tables,
- selecting a first table from the plurality of tables based on a located first hash code for the first table, the first table having a first skew value represented by the first hash code,
- selecting a second table from the plurality of tables based on a located second hash code for the second table, the second table having a second skew value represented by the second hash code, the second skew value being similar to the first skew value,
- joining the first table and the second table based on the first and second hash codes to create a temporary table, the temporary table having a temporary skew value,
- determining skew statistics for the temporary table, wherein the skew statistics include a row count a number of distinct values, and hashes of high mode values and their corresponding frequency of columns of interest, and
- storing the temporary table, the temporary skew value, and the determined skew statistics in the memory.
A non-transitory computer-readable medium comprising
- instructions that, when executed by a processor, cause the processor to perform operations comprising:
- selecting a first table from a plurality of tables, the first table having a first skew value;
- selecting a second table from the plurality of tables, the second table having a second skew value, the second skew value being similar to the first skew value;
- joining the first table and the second table to create a temporary table, the temporary table having a temporary skew value;
- determining skew statistics for the temporary table, wherein the skew statistics include a row count, a number of distinct values, and hashes of high mode values and their corresponding frequency of columns of interest;
- and
- storing the temporary table, the temporary skew value, and the determined skew statistics.
Dependencies are inferred from the claim text.