diff --git a/index-advisor.md b/index-advisor.md index 1fa59221c1332..8599feb32d15a 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. +In an `EXPLAIN` statement, you can use the `/*+ HYPO_INDEX(...) */` SQL comment syntax to define a hypothetical index for the query planner to consider. 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);