Explaining AQL queries becomes even easier in ArangoDB 2.8.
While previous versions required writing a hard-to-memoize command like
1
|
|
to explain an AQL query from the ArangoShell, 2.8 reduces this task to a mere
1
|
|
Apart from that, explain in 2.8 is smarter when confronted with very lengthy query strings, and with queries that contain huge hard-coded string, array, or object values.
For example, when creating an array bind variable with 1,000 values and using them in an explained query, 2.7 would print the entire 1,000 array values in the explain output:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
2.8 will instead truncate longer arrays and objects in the explain output for much improved readability:
Automatic value truncation will occur for array and object values with more than 20 elements or for string values longer than 1,024 characters. The truncation for explain will occur if these values are hard-coded into the query or are passed via bind parameters.
Truncation only happens inside the explain results processing and thus cannot affect the actual query results.