From 7f79c35cc180b87a631a96294bcdba2c3cbde550 Mon Sep 17 00:00:00 2001 From: zanmato1984 Date: Fri, 13 Aug 2021 20:35:10 +0800 Subject: [PATCH 1/2] Add description about table name/alias specifying for read_from_storage hint --- optimizer-hints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimizer-hints.md b/optimizer-hints.md index 88805ea1bcdb4..2c8cff4b7efec 100644 --- a/optimizer-hints.md +++ b/optimizer-hints.md @@ -193,7 +193,7 @@ select /*+ AGG_TO_COP() */ sum(t1.a) from t t1; ### READ_FROM_STORAGE(TIFLASH[t1_name [, tl_name ...]], TIKV[t2_name [, tl_name ...]]) -The `READ_FROM_STORAGE(TIFLASH[t1_name [, tl_name ...]], TIKV[t2_name [, tl_name ...]])` hint tells the optimizer to read specific table(s) from specific storage engine(s). Currently, this hint supports two storage engine parameters - `TIKV` and `TIFLASH`. For example: +The `READ_FROM_STORAGE(TIFLASH[t1_name [, tl_name ...]], TIKV[t2_name [, tl_name ...]])` hint tells the optimizer to read specific table(s) from specific storage engine(s). Currently, this hint supports two storage engine parameters - `TIKV` and `TIFLASH`. If the candidate table has an alias, you must use the alias as the parameter in `READ_FROM_STORAGE()`; if it does not has an alias, use the table's original name as the parameter. For example: {{< copyable "sql" >}} From 0e456c18603d6f9c2163882ea3064a62443b21e8 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 26 Aug 2021 14:57:25 +0800 Subject: [PATCH 2/2] Update optimizer-hints.md --- optimizer-hints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimizer-hints.md b/optimizer-hints.md index 2c8cff4b7efec..317056ba5e898 100644 --- a/optimizer-hints.md +++ b/optimizer-hints.md @@ -193,7 +193,7 @@ select /*+ AGG_TO_COP() */ sum(t1.a) from t t1; ### READ_FROM_STORAGE(TIFLASH[t1_name [, tl_name ...]], TIKV[t2_name [, tl_name ...]]) -The `READ_FROM_STORAGE(TIFLASH[t1_name [, tl_name ...]], TIKV[t2_name [, tl_name ...]])` hint tells the optimizer to read specific table(s) from specific storage engine(s). Currently, this hint supports two storage engine parameters - `TIKV` and `TIFLASH`. If the candidate table has an alias, you must use the alias as the parameter in `READ_FROM_STORAGE()`; if it does not has an alias, use the table's original name as the parameter. For example: +The `READ_FROM_STORAGE(TIFLASH[t1_name [, tl_name ...]], TIKV[t2_name [, tl_name ...]])` hint tells the optimizer to read specific table(s) from specific storage engine(s). Currently, this hint supports two storage engine parameters - `TIKV` and `TIFLASH`. If a table has an alias, use the alias as the parameter of `READ_FROM_STORAGE()`; if the table does not has an alias, use the table's original name as the parameter. For example: {{< copyable "sql" >}}