openCypher query hints
Important
openCypher query hint is only available from engine release 1.3.2.0 and later.
In Amazon Neptune, you can use the USING
clause to specify query hints for openCypher queries. These hints
allow you to control optimization and evaluation strategies.
The syntax for quert hints is:
USING {scope}:{hint} {value}
-
{scope}
defines the scope in which the hint applies to:Query
orClause
.A scope value of
Query
means that the query hint applies to the whole query (query-level).A scope value of
Clause
means that the query hint applies to the clause the hint precedes (clause-level). -
{hint}
is the name of the query hint being applied. -
{value}
is the argument for the{hint}
.
The values can be case-insensitive.
For example, to enable the query plan cache for a query:
Using QUERY:PLANCACHE "enabled" MATCH (a:Person {firstName: "Erin", lastName: $lastName}) RETURN a
Note
Currently, only the Query scope query hint PLANCACHE is supported. Supported query hints are listed below.