

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# openCypher 查詢提示
<a name="opencypher-query-hints"></a>

**重要**  
 openCypher 查詢提示僅適用於引擎版本 [1.3.2.0 ](https://docs.aws.amazon.com//neptune/latest/userguide/engine-releases-1.3.2.0.html)及更新版本。

 在 Amazon Neptune 中，您可以使用 `USING`子句來指定 openCypher 查詢的查詢提示。這些提示可讓您控制最佳化和評估策略。

 查詢提示的語法為：

```
USING {scope}:{hint} {value}
```

1.  `{scope}` 定義提示套用的範圍： `Query`或 `Clause`。

    的範圍值`Query`表示查詢提示適用於整個查詢 （查詢層級）。

    的範圍值`Clause`表示查詢提示會套用至提示前面的子句 （子句層級）。

1.  `{hint}` 是所套用查詢提示的名稱。

1.  `{value}` 是 的引數`{hint}`。

 這些值可以不區分大小寫。

 例如，若要啟用查詢的查詢計劃快取：

```
Using QUERY:PLANCACHE "enabled" 
MATCH (a:Person {firstName: "Erin", lastName: $lastName})
 RETURN a
```

**注意**  
 目前，支援**查詢**範圍查詢提示 **PLANCACHE**、**TIMEOUTMILLISECONDS** 和 **assumeConsistentDataTypes**。支援的查詢提示如下所示。

**Topics**
+ [openCypher 查詢計劃快取提示](opencypher-query-hints-qpc-hint.md)
+ [AssumeConsistentDataTypes 提示](opencypher-query-hints-AssumeConsistentDataTypes.md)
+ [openCypher 查詢逾時提示](opencypher-query-hints-timeout-hint.md)