From 16cfbb9ccf44c6c91ab77ab9c55a13d25fdeca15 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Wed, 2 Sep 2026 11:42:12 +0900 Subject: [PATCH 1/2] explain-joins: reword "create ... on disk" as "spill ... to disk" Co-Authored-By: Claude Sonnet 5 --- explain-joins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/explain-joins.md b/explain-joins.md index 37b5b6e102b04..77a6703e5e3b8 100644 --- a/explain-joins.md +++ b/explain-joins.md @@ -219,7 +219,7 @@ The `operator info` column in the `EXPLAIN` result table also records other info ### Runtime Statistics -If [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) (default value: 1 GB) is exceeded, and the [`tidb_enable_tmp_storage_on_oom`](/system-variables.md#tidb_enable_tmp_storage_on_oom) value is `ON` (default), TiDB will attempt to use temporary storage, and might create the `Build` operator (used as part of the hash join) on disk. Runtime statistics such as memory usage are recorded in the `execution info` of the `EXPLAIN ANALYZE` result table. The following example shows the output of `EXPLAIN ANALYZE` with a 1 GB (default) and a 500 MB quota for `tidb_mem_quota_query`. At 500 MB, disk is used for temporary storage: +If [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) (default value: 1 GB) is exceeded, and the [`tidb_enable_tmp_storage_on_oom`](/system-variables.md#tidb_enable_tmp_storage_on_oom) value is `ON` (default), TiDB will attempt to use temporary storage, and might spill the `Build` operator (used as part of the hash join) to disk. Runtime statistics such as memory usage are recorded in the `execution info` of the `EXPLAIN ANALYZE` result table. The following example shows the output of `EXPLAIN ANALYZE` with a 1 GB (default) and a 500 MB quota for `tidb_mem_quota_query`. At 500 MB, disk is used for temporary storage: ```sql EXPLAIN ANALYZE SELECT /*+ HASH_JOIN(t1, t2) */ * FROM t1, t2 WHERE t1.id = t2.id; From 66787fe2977728a070de29ef102256fc58ee31c9 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Thu, 3 Sep 2026 15:39:43 +0900 Subject: [PATCH 2/2] Update explain-joins.md Co-authored-by: Grace Cai --- explain-joins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/explain-joins.md b/explain-joins.md index 77a6703e5e3b8..36f411154c1d9 100644 --- a/explain-joins.md +++ b/explain-joins.md @@ -219,7 +219,7 @@ The `operator info` column in the `EXPLAIN` result table also records other info ### Runtime Statistics -If [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) (default value: 1 GB) is exceeded, and the [`tidb_enable_tmp_storage_on_oom`](/system-variables.md#tidb_enable_tmp_storage_on_oom) value is `ON` (default), TiDB will attempt to use temporary storage, and might spill the `Build` operator (used as part of the hash join) to disk. Runtime statistics such as memory usage are recorded in the `execution info` of the `EXPLAIN ANALYZE` result table. The following example shows the output of `EXPLAIN ANALYZE` with a 1 GB (default) and a 500 MB quota for `tidb_mem_quota_query`. At 500 MB, disk is used for temporary storage: +If [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) (default value: 1 GB) is exceeded, and the [`tidb_enable_tmp_storage_on_oom`](/system-variables.md#tidb_enable_tmp_storage_on_oom) value is `ON` (default), TiDB will attempt to use temporary storage and might spill data from the Build side of the hash join to disk. Runtime statistics such as memory usage are recorded in the `execution info` of the `EXPLAIN ANALYZE` result table. The following example shows the output of `EXPLAIN ANALYZE` with a 1 GB (default) and a 500 MB quota for `tidb_mem_quota_query`. At 500 MB, disk is used for temporary storage: ```sql EXPLAIN ANALYZE SELECT /*+ HASH_JOIN(t1, t2) */ * FROM t1, t2 WHERE t1.id = t2.id;