# US 2021/0279252 A1 · Adaptive distribution method for hash operations

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0279252 A1
- Document ID: US20210279252A1
- Status: Published application
- Kind: A1
- Application number: 17/327,573
- Filed: 2021-05-21
- Published: 2021-09-09
- Earliest claimed: 2014-02-19
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Benoit Dageville; Thierry Cruanes; Marcin Zukowski; Allison Waingold Lee; Philipp Thomas Unterbrunner
- Web page: https://patentgrep.com/patent/US20210279252A1

## CPC

- G06F 16/273: {Asynchronous replication or reconciliation}
- A61F 5/566: {Intra-oral devices}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/5016: {the resource being the memory}
- G06F 9/5044: {considering hardware capabilities}
- G06F 9/5083: {Techniques for rebalancing the load in a distributed system}
- G06F 9/5088: {involving task migration}
- G06F 16/128: {Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion (error detection or correction of the data by redundancy in operations or in hardware G06F11/14, G06F11/16)}
- G06F 16/148: {File search processing}
- G06F 16/1827: {Management specifically adapted to NAS (management of storage area networks [SAN] G06F3/067)}
- G06F 16/211: {Schema design and management}
- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/24532: {of parallel queries}
- G06F 16/24545: {Selectivity estimation or determination}
- G06F 16/24552: {Database cache management}
- G06F 16/2456: {Join operations}
- G06F 16/2471: {Distributed queries}
- G06F 16/254: {Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/283: {Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP}
- G06F 16/951: Indexing; Web crawling techniques
- G06F 16/9535: Search customisation based on user profiles and personalisation
- G06F 16/9538: Presentation of query results
- H04L 67/1095: Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
- H04L 67/1097: for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
- H04L 67/568: Storing data temporarily at an intermediate stage, e.g. caching
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- A61F: FILTERS IMPLANTABLE INTO BLOOD VESSELS; PROSTHESES; DEVICES PROVIDING PATENCY TO, OR PREVENTING COLLAPSING OF, TUBULAR STRUCTURES OF THE BODY, e.g. STENTS; ORTHOPAEDIC, NURSING OR CONTRACEPTIVE DEVICES; FOMENTATION; TREATMENT OR PROTECTION OF EYES OR EARS; BANDAGES, DRESSINGS OR ABSORBENT PADS; FIRST-AID KITS (dental prosthetics A61C)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method, apparatus, and system for join operations of a plurality of relations that are distributed over a plurality of storage locations over a network of computing components.

## Claims

### Claim 1

A method of performing an implementation of a join operation, comprising:
separating a join operation into a build operation and a probe operation;
determining, by a processing device, a distribution method to distribute at least one of a first relation and a second relation to the probe operation based at least in part on an actual size of the second relation; and
performing the probe operation on the first relation and the second relation.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining the distribution method to distribute at least one of the first relation and the second relation is based on a cost metric associated with performing the distribution method on the first relation and the second relation.

### Claim 3 (depends on 2)

The method of claim 2, wherein the cost metric is a computational cost or a memory cost associated with the distribution method and the actual size of the second relation.

### Claim 4 (depends on 2)

The method of claim 2, wherein determining the distribution method to distribute at least one of the first relation and the second relation based on the cost metric comprises:
determining that a broadcast join is a most efficient type of join operation based on the cost metric.

### Claim 5 (depends on 4)

The method of claim 4, further comprising distributing the second relation using the broadcast join, wherein using the broadcast join comprises assigning at least part of the second relation to two or more processing nodes associated with the first relation.

### Claim 6 (depends on 5)

The method of claim 5, wherein distributing the second relation comprises:
duplicating the second relation across the two or more processing nodes associated with the first relation; and
forwarding a local partition of the first relation to a local instance of a probe operator of the probe operation for performing a join query.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
performing the build operation on the second relation, wherein performing the build operation comprises building a hash table for the second relation.

### Claim 8 (depends on 7)

The method of claim 7, wherein the actual size of the second relation is determined prior to performing the probe operation.

### Claim 9 (depends on 7)

The method of claim 7, wherein performing the probe operation on the first relation and the second relation comprises:
reading an inner stream of the first relation and the second relation; and
probing the hash table generated by the build operation to identify tuples of the first relation and the second relation that satisfy a join condition.

### Claim 10 (depends on 1)

The method of claim 1, wherein the join operation is an equijoin operation.

### Claim 11

A system comprising:
a memory to store a plurality of relations; and
a processor, operatively coupled to the memory, the processor to:
separate a join operation into a build operation and a probe operation;
determine a distribution method to distribute at least one of a first relation and a second relation to the probe operation based at least in part on an actual size of the second relation; and
performing the probe operation on the first relation and the second relation.

### Claim 12 (depends on 11)

The system of claim 11, wherein the processor is to determine the distribution method to distribute at least one of the first relation and the second relation based on a cost metric associated with performing the distribution method on the first relation and the second relation.

### Claim 13 (depends on 12)

The system of claim 12, wherein the cost metric is a computational cost or a memory cost associated with the distribution method and the actual size of the second relation.

### Claim 14 (depends on 12)

The system of claim 12, wherein to determine the distribution method to distribute at least one of the first relation and the second relation based on the cost metric, the processor is to:
determine that a broadcast join is a most efficient type of join operation based on the cost metric.

### Claim 15 (depends on 14)

The system of claim 14, wherein the processor is further to distribute the second relation using the broadcast join, wherein to use the broadcast join the processor is to assign at least part of the second relation to two or more processing nodes associated with the first relation.

### Claim 16 (depends on 15)

The system of claim 15, wherein to distribute the second relation the processor is to:
duplicate the second relation across the two or more processing nodes associated with the first relation; and
forward a local partition of the first relation to a local instance of a probe operator for performing a join query.

### Claim 17 (depends on 11)

The system of claim 11, wherein the processor is further to:
perform the build operation on the second relation, wherein performing the build operation comprises building a hash table for the second relation.

### Claim 18 (depends on 17)

The system of claim 17, wherein the actual size of the second relation is determined prior to performing the probe operation.

### Claim 19 (depends on 17)

The system of claim 17, wherein to perform the probe operation on the first relation and the second relation comprises, the processor is to:
read an inner stream of the first relation and the second relation; and
probe the hash table generated by the build operation to identify tuples of the first relation and the second relation that satisfy a join condition.

### Claim 20 (depends on 11)

The system of claim 11, wherein the join operation is an equijoin operation.

### Claim 21

A non-transitory computer readable medium having instructions stored thereon that, when executed by a processor, cause the processor to:
separate a join operation into a build operation and a probe operation;
determine, by a processor, a distribution method to distribute at least one of a first and a second relation to the probe operation based at least in part on an actual size of the second relation; and
perform the probe operation on the first relation and the second relation.

### Claim 22 (depends on 21)

The non-transitory computer readable medium of claim 21, wherein to determine the distribution method to distribute at least one of the first relation and the second relation is further based on a cost metric associated with the distribution method of the first relation and the second relation.

### Claim 23 (depends on 22)

The non-transitory computer readable medium of claim 22, wherein the cost metric is a computational cost or a memory cost associated with the distribution method and the actual size of the second relation.

### Claim 24 (depends on 22)

The non-transitory computer readable medium of claim 22, wherein to determine the distribution method to distribute at least one of the first relation and second relation based on the cost metric the processor is to:
determine that a broadcast join is a most efficient type of join operation based on the cost metric.

### Claim 25 (depends on 24)

The non-transitory computer readable medium of claim 24, wherein the processor is further to distribute the second relation using the broadcast join, wherein to use the broadcast join the processor is to assign at least part of the second relation to two or more processing nodes associated with the first relation.

### Claim 26 (depends on 25)

The non-transitory computer readable medium of claim 25, wherein to distribute the second relation the processor is to:
duplicate the second relation across the two or more processing nodes associated with the first relation; and
forward a local partition of the first relation to a local instance of a probe operator for performing a join query.

### Claim 27 (depends on 21)

The non-transitory computer readable medium of claim 21, wherein the processor is further to:
perform the build operation on the second relation, wherein performing the build operation comprises building a hash table for the second relation.

### Claim 28 (depends on 27)

The non-transitory computer readable medium of claim 27, wherein the actual size of the second relation is determined prior to performing the probe operation.

### Claim 29 (depends on 27)

The non-transitory computer readable medium of claim 27, wherein to perform the probe operation on the first relation and the second relation comprises, the processor is to:
read an inner stream of the first relation and the second relation; and
probe the hash table generated by the build operation to identify tuples of the first relation and the second relation that satisfy a join condition.

### Claim 30 (depends on 21)

The non-transitory computer readable medium of claim 21, wherein the join operation is an equijoin operation.
