From 8babfe9c3cf35eb75e3973c4a48432516ca0dd18 Mon Sep 17 00:00:00 2001 From: doc-claw-bot Date: Fri, 17 Jul 2026 09:42:02 +0000 Subject: [PATCH] docs: clarify HYPO_INDEX scope in index advisor --- index-advisor.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index-advisor.md b/index-advisor.md index 1fa59221c1332..68e53d0f1de41 100644 --- a/index-advisor.md +++ b/index-advisor.md @@ -192,13 +192,13 @@ WHERE last_access_time IS NOT NULL AND percentage_access_0 + percentage_access_0 ## Hypothetical indexes -Hypothetical indexes (Hypo Indexes) are created using SQL comments, similar to [query hints](/optimizer-hints.md), rather than through the `CREATE INDEX` statement. This approach enables lightweight experimentation with indexes without the overhead of physically materializing them. +Hypothetical indexes (Hypo Indexes) use the same `/*+ ... */` comment syntax as [optimizer hints](/optimizer-hints.md), rather than the `CREATE INDEX` statement. The `HYPO_INDEX` hint is dedicated to hypothetical indexes and currently takes effect only in `EXPLAIN` statements. This approach enables lightweight experimentation with indexes without the overhead of physically materializing them. For example, the `/*+ HYPO_INDEX(t, idx_ab, a, b) */` comment instructs the query planner to create a hypothetical index named `idx_ab` on table `t` for columns `a` and `b`. The planner generates the index's metadata but does not physically materialize it. If applicable, the planner considers this hypothetical index during query optimization without incurring the costs associated with index creation. The `RECOMMEND INDEX` advisor uses hypothetical indexes for "What-If" analysis to evaluate potential benefits of different indexes. You can also use hypothetical indexes directly to experiment with index designs before proceeding to create them. -The following example shows a query using a hypothetical index: +The following example shows an `EXPLAIN` statement using a hypothetical index: ```sql CREATE TABLE t(a INT, b INT, c INT);