{"id":27933,"date":"2025-06-20T04:50:24","date_gmt":"2025-06-20T11:50:24","guid":{"rendered":"https:\/\/www.pingcap.com\/?p=27933"},"modified":"2025-11-24T21:46:32","modified_gmt":"2025-11-25T05:46:32","slug":"hash-join-improvements-in-tidb-8-5-part-1","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/","title":{"rendered":"Improving TiDB Hash Joins: Up to 5\u00d7 Faster with No Tuning Required"},"content":{"rendered":"<p>Hash joins are a common performance bottleneck in SQL workloads, and TiDB was no exception. In <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/release-8.5.0\/\">TiDB 8.5<\/a>, we introduced a brand-new hash join executor that improves performance across the board. This new engine fully exploits modern hardware with multi-threaded build, vectorized probe, and a more efficient spill strategy. Internal benchmarks show it doubles the performance of common join workloads, <a href=\"https:\/\/www.pingcap.com\/ko\/article\/how-to-achieve-low-latency-in-databases\/\">reduces latency<\/a>, and improves predictability under tight memory constraints.<\/p>\n\n\n\n<p>This is the first part of a two part blog series. In this post, we&#8217;ll focus on high-level updates and what users need to know to benefit from the performance gains. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Joins_Still_Matter\"><\/span>Why Joins Still Matter<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Joins are at the heart of both analytical and transactional workloads. When they slow down, they do not just impact a single query. They can bottleneck entire applications.<\/p>\n\n\n\n<p>Hash joins are often the go-to for performance, but under real-world conditions like skewed data or constrained memory, they can become unreliable and hard to debug. TiDB\u2019s original hash join executor had several limitations: it built the hash table using a single thread, relied on Go\u2019s general-purpose map structure, and had limited spill capabilities when memory ran out.<\/p>\n\n\n\n<p>These issues led to high latency and inconsistent performance. If you have ever had a TiDB join stall, this was likely the cause.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Background\"><\/span>Background<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>TiDB uses hash joins to execute a wide range of SQL queries, particularly when equality conditions are involved across large datasets. In a typical hash join, the executor selects one table as the build side and constructs an in-memory hash table from its rows. The other table is used to probe for matches.<\/p>\n\n\n\n<p>For example, the following queries all trigger a hash join in TiDB:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Classic inner join\nSELECT * FROM lineitem l JOIN orders o ON l.orderkey = o.orderkey;\n\n-- Semi join with filter\nSELECT * FROM lineitem l WHERE EXISTS (\n  SELECT 1 FROM orders o WHERE l.orderkey = o.orderkey AND o.orderstatus = 'F'\n);\n\n-- Join with additional filter\nSELECT * FROM lineitem l JOIN orders o\n  ON l.orderkey = o.orderkey AND l.partkey &gt; o.custkey;<\/code><\/pre>\n\n\n\n<p>In earlier versions of TiDB, the build side was processed by a single thread using Go\u2019s built-in map structure. This structure was not optimized for large-scale joins. It introduced pointer indirection, poor CPU cache locality, and runtime map resizes, which became <a href=\"https:\/\/docs.pingcap.com\/tidb\/stable\/analyze-slow-queries\/\">performance bottlenecks<\/a> as data volumes grew.<\/p>\n\n\n\n<p>The probe phase had similar issues. Joins were executed one row at a time, which prevented any form of vectorization. For join types like semi joins, the executor did not short-circuit after finding a match. Instead, it continued scanning for duplicates. If the join involved string keys, collation logic was re-evaluated on each candidate match, further increasing cost.<\/p>\n\n\n\n<p>When memory usage exceeded configured limits, TiDB attempted to spill intermediate data to disk. However, only the row data was spilled; the hash table remained in memory. This limited how much memory could be reclaimed. Under constrained memory, this often resulted in query failures or significantly degraded performance due to inefficient disk access patterns.<\/p>\n\n\n\n<p>These limitations motivated a complete redesign of the hash join executor in TiDB 8.5, with a focus on parallelism, memory efficiency, and predictable performance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Legacy_Bottlenecks\"><\/span>The Legacy Bottlenecks<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The original hash join executor in TiDB had several architectural limitations that created performance challenges, especially in large or complex queries like the examples shown in the previous section. These issues affected all three major phases of execution: build, probe, and spill.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Build phase<\/h3>\n\n\n\n<p>The build phase was limited by its single-threaded design. Even when TiDB was running on a system with 16 or 32 cores, only one core was used to construct the hash table. This created a hard limit on throughput, particularly for joins like the&nbsp;<code>lineitem<\/code>\u2013<code>orders<\/code>&nbsp;query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM lineitem l JOIN orders o ON l.orderkey = o.orderkey;<\/code><\/pre>\n\n\n\n<p>Additional bottlenecks included:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Single-threaded execution<\/strong>. The hash table for the build side (e.g.,&nbsp;<code>orders<\/code>) was constructed by a single worker.<\/li>\n\n\n\n<li><strong>Go map inefficiencies<\/strong>. The use of Go\u2019s built-in map introduced pointer chasing and cache misses, which slowed down CPU-bound operations.<\/li>\n\n\n\n<li><strong>Dynamic resizing<\/strong>. As the map grew, it resized unpredictably during query execution, causing latency spikes.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Probe phase<\/h3>\n\n\n\n<p>Once the build was complete, the probe side processed rows one at a time. This was costly, especially in queries with join filters or non-equality conditions, such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM lineitem l JOIN orders o\n  ON l.orderkey = o.orderkey AND l.partkey &gt; o.custkey;<\/code><\/pre>\n\n\n\n<p>Key inefficiencies during this phase:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>No vectorization<\/strong>. Each input row triggered a full function call for key matching and predicate evaluation.<\/li>\n\n\n\n<li><strong>Unoptimized join semantics<\/strong>. For semi joins, TiDB scanned all matching build rows, even if a single match would have been sufficient.<\/li>\n\n\n\n<li><strong>Repeated comparisons<\/strong>. String keys with collation rules were re-evaluated on each candidate match, adding significant CPU overhead.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Spill phase&nbsp;<\/h3>\n\n\n\n<p>When queries exceeded their memory quota, TiDB attempted to spill data to disk. However, this mechanism was incomplete and introduced further problems:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Incomplete spilling<\/strong>. Only row data was written to disk. The in-memory hash table remained resident, limiting how much memory could be recovered.<\/li>\n\n\n\n<li><strong>Inefficient I\/O<\/strong>. Probing against spilled data required random disk access, which led to unpredictable and often poor performance.<\/li>\n<\/ul>\n\n\n\n<p>These bottlenecks made join-heavy workloads hard to scale, especially when memory was constrained or the input data was large or skewed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Design_Principles_for_a_Fresh_Start\"><\/span>Design Principles for a Fresh Start<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To address the limitations of the original executor, we redesigned the hash join engine from the ground up in TiDB 8.5. The new design is built around five principles that improve performance, predictability, and scalability.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Exploit all available CPU cores<\/strong>\n<ol class=\"wp-block-list\">\n<li>The build-side data is physically partitioned.<\/li>\n\n\n\n<li>Each partition is processed in parallel by separate threads.<\/li>\n\n\n\n<li>This eliminates the single-threaded bottleneck and shortens the build phase significantly.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Store build-side data in row format<\/strong>\n<ol class=\"wp-block-list\">\n<li>The build input is stored as rows rather than columns.<\/li>\n\n\n\n<li>This improves cache locality during result construction.<\/li>\n\n\n\n<li>It also simplifies join result materialization, especially for wide rows.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Use a fixed-size, chain-based hash table<\/strong>\n<ol class=\"wp-block-list\">\n<li>Memory for the hash table is allocated up front.<\/li>\n\n\n\n<li>Hash collisions are handled using chaining rather than probing.<\/li>\n\n\n\n<li>This avoids dynamic resizing and ensures consistent performance.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Run probes using a vectorized, chunk-based path<\/strong>\n<ol class=\"wp-block-list\">\n<li>Probing is performed in batches instead of row by row.<\/li>\n\n\n\n<li>Join keys and filters are evaluated together using vectorized logic.<\/li>\n\n\n\n<li>This improves throughput and reduces per-row overhead.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Enable spill that includes hash buckets<\/strong>\n<ol class=\"wp-block-list\">\n<li>When memory is low, entire partitions, including rows and hash table buckets, are spilled to disk.<\/li>\n\n\n\n<li>Both spilling and restoring are sequential and partition-aware.<\/li>\n\n\n\n<li>This allows spilling to scale while maintaining acceptable performance under constrained memory.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p>These changes allow the new engine to scale up across cores and scale down under tight memory, while maintaining predictable behavior and high performance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_the_New_Engine_Works\"><\/span>How the New Engine Works<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The new hash join engine introduces parallelism, vectorization, and a smarter spill path to address each phase of execution. The following table summarizes what changed and how it improves performance.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Stage<\/td><td>What Changed<\/td><td>Why It Is Faster<\/td><\/tr><tr><td>Pre-build<\/td><td>Input chunks are hash-partitioned and simultaneously converted from column format to row format.<\/td><td>Eliminates the need for a second scan and improves row locality for result construction.<\/td><\/tr><tr><td>Build<\/td><td>Each partition is built in parallel using a thread-local, fixed-size hash table.<\/td><td>Fully utilizes CPU cores. In TPC-H 50 tests, hash table build time dropped from 73 seconds to 7.<\/td><\/tr><tr><td>Probe<\/td><td>Probing is done in batches. Tagged pointers quickly reject most false matches, and filters are evaluated using vectorized expressions.<\/td><td>Reduces unnecessary comparisons and improves cache efficiency. Probe time dropped from 208 seconds to 77 in TPC-H 50.<\/td><\/tr><tr><td>Spill<\/td><td>If memory limits are reached, entire partitions (including hash buckets) are written to disk sequentially and restored in the same form.<\/td><td>Minimizes random I\/O. Performance remains stable even with 1 GB memory quota.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>This new execution model not only speeds up in-memory joins but also makes out-of-memory behavior much more predictable and efficient.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Real-World_Impact\"><\/span>Real-World Impact<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To evaluate the new hash join engine, we tested it against the legacy implementation using representative queries and datasets. The improvements are significant across a variety of join types and scales.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Benchmark: Simple inner join<\/h3>\n\n\n\n<p>Joining two large tables with a straightforward equality condition.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM lineitem l JOIN orders o ON l.orderkey = o.orderkey;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Legacy<\/strong>: 65 seconds<\/li>\n\n\n\n<li><strong>New engine<\/strong>: 29 seconds<\/li>\n\n\n\n<li><strong>Speedup<\/strong>: 2.2\u00d7<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Benchmark: Join with non-equality predicate<\/h3>\n\n\n\n<p>Adds a post-join filter, increasing CPU and memory pressure.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM lineitem l JOIN orders o\n  ON l.orderkey = o.orderkey AND l.partkey &gt; o.custkey;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Legacy<\/strong>: 143 seconds<\/li>\n\n\n\n<li><strong>New engine<\/strong>: 29 seconds<\/li>\n\n\n\n<li><strong>Speedup<\/strong>: 4.9\u00d7<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Benchmark: Full TPC-H 50 GB&nbsp;<\/h3>\n\n\n\n<p>End-to-end results for the TPC-H benchmark suite at scale factor 50.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hash build time<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Legacy: 73 seconds<\/li>\n\n\n\n<li>New: 7 seconds<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Hash probe time<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Legacy: 208 seconds<\/li>\n\n\n\n<li>New: 77 seconds<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Total query runtime<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Legacy: 647 seconds<\/li>\n\n\n\n<li>New: 561 seconds<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-verse\"><strong><em>At this scale, join performance is no longer the primary bottleneck. The remaining time is dominated by scan and aggregation operators.<\/em><\/strong><\/pre>\n\n\n\n<p>Even under constrained resources, the new executor performs reliably. With just a 1 GB memory quota, the new engine completes queries successfully while the legacy path either fails or becomes 6\u00d7 slower.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_This_Means_for_You\"><\/span>What This Means for You<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The improvements in TiDB\u2019s hash join executor are designed to deliver consistent performance, even as workloads scale or memory becomes constrained. Whether you&#8217;re running complex analytic queries or high-throughput transactional joins, the benefits are immediate and measurable.<\/p>\n\n\n\n<p>Here\u2019s what you can expect:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Consistent latency under pressure<\/strong>&#8211; The new engine maintains stable performance even with aggressive memory quotas. Spills are handled efficiently, and queries remain predictable.<\/li>\n\n\n\n<li><strong>Better resource utilization<\/strong>&#8211; Fixed-size memory allocation and parallel execution reduce CPU and memory waste. Joins complete faster without requiring oversized instances.<\/li>\n\n\n\n<li><strong>Scalability across workloads<\/strong>&#8211; Whether you are joining millions or billions of rows, the new engine adapts to available hardware and continues to perform efficiently.<\/li>\n\n\n\n<li><strong>Future-ready architecture<\/strong>&#8211; The vectorized and partitioned design opens the door for future improvements, such as SIMD acceleration, GPU integration, and advanced join optimizations.<\/li>\n<\/ul>\n\n\n\n<p>This update is one of the most impactful performance improvements in TiDB 8.5 and lays a strong foundation for continued execution-layer enhancements in upcoming releases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Next_Steps\"><\/span>Next Steps<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The new hash join executor is available starting in TiDB 8.5. It is disabled by default in this version but will become the default behavior in a future version.&nbsp;<\/p>\n\n\n\n<p>To try it out in 8.5, you can enable it at the session level:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>set session tidb_hash_join_version=optimized<\/code><\/pre>\n\n\n\n<p>Once enabled, the optimizer will choose the new executor for eligible queries automatically. No schema changes or application modifications are required.<\/p>\n\n\n\n<p>If you are currently tuning queries or experiencing unpredictable performance on large joins, we encourage you to test this feature in your environment. You can report feedback or share results with us in <a href=\"https:\/\/github.com\/pingcap\/tidb\">GitHub Discussions<\/a> or in the <a href=\"https:\/\/slack.tidb.io\/invite?team=tidb-community&amp;channel=everyone\">TiDB Community Slack<\/a>.<\/p>\n\n\n\n<p>This upgrade is part of our broader investment in execution-layer performance. We look forward to hearing how it performs in your workloads.<\/p>\n\n\n\n<p><em>In the second part of this blog series, we&#8217;ll dive deeper into the engineering details for the open source community. Stay tuned for this next entry in the coming weeks.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>Hash joins are a common performance bottleneck in SQL workloads, and TiDB was no exception. In TiDB 8.5, we introduced a brand-new hash join executor that improves performance across the board. This new engine fully exploits modern hardware with multi-threaded build, vectorized probe, and a more efficient spill strategy. Internal benchmarks show it doubles the [&hellip;]<\/p>\n","protected":false},"author":143,"featured_media":28009,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","footnotes":""},"categories":[6],"tags":[147,413,111,414],"class_list":["post-27933","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering","tag-distributed-sql","tag-hash-joins","tag-tidb","tag-tidb-8-5"],"acf":[],"featured_image_src":"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png","author_info":{"display_name":"Fei Xu","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/fei-xu\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hash Join Improvements in TiDB: Up to 5X Faster with No Tuning<\/title>\n<meta name=\"description\" content=\"Discover how TiDB 8.5 introduces a reengineered hash join executor that doubles performance, reduces latency, and improves scalability.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hash Join Improvements in TiDB: Up to 5X Faster with No Tuning\" \/>\n<meta property=\"og:description\" content=\"Discover how TiDB 8.5 introduces a reengineered hash join executor that doubles performance, reduces latency, and improves scalability.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-20T11:50:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-25T05:46:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2025\/06\/27122243\/tidb_1200x627-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1254\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fei Xu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/static.pingcap.com\/files\/2025\/06\/27122300\/tidb_twitter_1600x900-1-3-scaled.png\" \/>\n<meta name=\"twitter:creator\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fei Xu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/\"},\"author\":{\"name\":\"Fei Xu\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/cb489402585f38543b640e0b880c622b\"},\"headline\":\"Improving TiDB Hash Joins: Up to 5\u00d7 Faster with No Tuning Required\",\"datePublished\":\"2025-06-20T11:50:24+00:00\",\"dateModified\":\"2025-11-25T05:46:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/\"},\"wordCount\":1685,\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png\",\"keywords\":[\"Distributed SQL\",\"Hash Joins\",\"TiDB\",\"TiDB 8.5\"],\"articleSection\":[\"Engineering\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/\",\"url\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/\",\"name\":\"Hash Join Improvements in TiDB: Up to 5X Faster with No Tuning\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png\",\"datePublished\":\"2025-06-20T11:50:24+00:00\",\"dateModified\":\"2025-11-25T05:46:32+00:00\",\"description\":\"Discover how TiDB 8.5 introduces a reengineered hash join executor that doubles performance, reduces latency, and improves scalability.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#primaryimage\",\"url\":\"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png\",\"width\":2560,\"height\":853},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Improving TiDB Hash Joins: Up to 5\u00d7 Faster with No Tuning Required\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pingcap.com\/#website\",\"url\":\"https:\/\/www.pingcap.com\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pingcap.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pingcap.com\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\/\/www.pingcap.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/pingcap2015\",\"https:\/\/x.com\/PingCAP\",\"https:\/\/linkedin.com\/company\/pingcap\",\"https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/cb489402585f38543b640e0b880c622b\",\"name\":\"Fei Xu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg\",\"caption\":\"Fei Xu\"},\"url\":\"https:\/\/www.pingcap.com\/ko\/blog\/author\/fei-xu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hash Join Improvements in TiDB: Up to 5X Faster with No Tuning","description":"Discover how TiDB 8.5 introduces a reengineered hash join executor that doubles performance, reduces latency, and improves scalability.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/","og_locale":"ko_KR","og_type":"article","og_title":"Hash Join Improvements in TiDB: Up to 5X Faster with No Tuning","og_description":"Discover how TiDB 8.5 introduces a reengineered hash join executor that doubles performance, reduces latency, and improves scalability.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2025-06-20T11:50:24+00:00","article_modified_time":"2025-11-25T05:46:32+00:00","og_image":[{"width":2400,"height":1254,"url":"https:\/\/static.pingcap.com\/files\/2025\/06\/27122243\/tidb_1200x627-2.png","type":"image\/png"}],"author":"Fei Xu","twitter_card":"summary_large_image","twitter_image":"https:\/\/static.pingcap.com\/files\/2025\/06\/27122300\/tidb_twitter_1600x900-1-3-scaled.png","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"Written by":"Fei Xu","Est. reading time":"9\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/"},"author":{"name":"Fei Xu","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/cb489402585f38543b640e0b880c622b"},"headline":"Improving TiDB Hash Joins: Up to 5\u00d7 Faster with No Tuning Required","datePublished":"2025-06-20T11:50:24+00:00","dateModified":"2025-11-25T05:46:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/"},"wordCount":1685,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png","keywords":["Distributed SQL","Hash Joins","TiDB","TiDB 8.5"],"articleSection":["Engineering"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/","url":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/","name":"Hash Join Improvements in TiDB: Up to 5X Faster with No Tuning","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png","datePublished":"2025-06-20T11:50:24+00:00","dateModified":"2025-11-25T05:46:32+00:00","description":"Discover how TiDB 8.5 introduces a reengineered hash join executor that doubles performance, reduces latency, and improves scalability.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png","width":2560,"height":853},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Improving TiDB Hash Joins: Up to 5\u00d7 Faster with No Tuning Required"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]},{"@type":"Person","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/cb489402585f38543b640e0b880c622b","name":"Fei Xu","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/image\/","url":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","contentUrl":"https:\/\/static.pingcap.com\/files\/2022\/10\/17234942\/avatar.jpg","caption":"Fei Xu"},"url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/fei-xu\/"}]}},"grav_blocks":false,"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/hash-join-improvements-in-tidb-8-5-part-1\/\"><div class=\"card-resource__image-container\"><img class=\"card-resource__image\" alt=\"tidb_feature_1800x600 (1)\" src=\"https:\/\/static.pingcap.com\/files\/2025\/06\/27122210\/tidb_feature_1800x600-1-3-scaled.png\" loading=\"lazy\" width=2560 height=853 \/><\/div><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Engineering<\/div><\/div><h5 class=\"card-resource__title\">Improving TiDB Hash Joins: Up to 5\u00d7 Faster with No Tuning Required<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/27933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/143"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=27933"}],"version-history":[{"count":10,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/27933\/revisions"}],"predecessor-version":[{"id":30659,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/27933\/revisions\/30659"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/28009"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=27933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=27933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=27933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}