

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

# openCypher 查詢計劃快取提示
<a name="opencypher-query-hints-qpc-hint"></a>

 查詢計畫快取行為可以透過查詢層級查詢提示 ，根據每個查詢 （無論是否參數化） 覆寫`QUERY:PLANCACHE`。它需要與 `USING`子句搭配使用。查詢提示接受 `enabled`或 `disabled`作為值。如需查詢計劃快取的詳細資訊，請參閱 [Amazon Neptune 中的查詢計畫快取](access-graph-qpc.md)。

```
# Forcing plan to be cached or reused
% curl -k https://<endpoint>:<port>/opencypher \
  -d "query=Using QUERY:PLANCACHE \"enabled\" MATCH(n) RETURN n LIMIT 1"
  
% curl -k https://<endpoint>:<port>/opencypher \
  -d "query=Using QUERY:PLANCACHE \"enabled\" RETURN \$arg" \
  -d "parameters={\"arg\": 123}"
  
# Forcing plan to be neither cached nor reused
% curl -k https://<endpoint>:<port>/opencypher \
  -d "query=Using QUERY:PLANCACHE \"disabled\" MATCH(n) RETURN n LIMIT 1"
```