Amazon Neptune
User Guide (API Version 2017-11-29)

Gremlin Query Hints noReordering

When submitting a Gremlin traversal, the Neptune query engine investigates the structure of the traversal and reorders parts of the query, attempting to minimize the amount of work required for evaluation and query response time.

For example, a traversal with multiple constraints, such as multiple has() steps, is typically not evaluated in the given order, but reordered after the query is checked with static analysis.

Neptune query engine attempts to identify which constraint is more selective and run that one first.

This often results in better performance, but the order in which Neptune chooses to evaluate the query may not always be optimal.

If you know the exact characteristics of the data and want to manually dictate the order of the query execution, Neptune noReordering query hint can be used to specify the traversal be evaluated in the order given.

Syntax

The noReordering query hint is specified by adding a withSideEffect step to the query.

g.withSideEffect('Neptune#noReordering, 'value').gremlin-traversal

Note

All Gremlin query hints side effects are prefixed with Neptune#.

Available Values

  • true

  • false

On this page: