# Using Precomputed Hash in SemiJoin Operations

DevFeed: [Using Precomputed Hash in SemiJoin Operations](<https://devfeed.tech/articles/using-precomputed-hash-in-semijoin-operations-8619.md>)

Original publisher: [Read original article](<https://trino.io/blog/2019/05/30/semijoin-precomputed-hasd.html>)

Author: Shubham Tagra, Qubole

Published: 2019-05-30T00:00:00Z

Content type: article

Language: en

Sources: [Trino Blog](<https://devfeed.tech/sources/trino-blog.md>)

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [hash](<https://devfeed.tech/tags/hash.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [performance](<https://devfeed.tech/tags/performance.md>)

## AI overview

The article explains a Presto 312 optimization that reuses precomputed hash values in SemiJoin operations. This removes redundant hash calculations and significantly improves queries using IN or NOT IN over subqueries.

## Source excerpt

Queries involving IN and NOT IN over a subquery are much faster in Presto 312.