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 query hints is:
USING {scope}:{hint} {value}
-
{scope}defines the scope in which the hint applies to:QueryorClause.A scope value of
Querymeans that the query hint applies to the whole query (query-level).A scope value of
Clausemeans 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, the Query scope query hints PLANCACHE, TIMEOUTMILLISECONDS, and assumeConsistentDataTypes are supported. Supported query hints are listed below.