ArangoDB v3.12 is under development and not released yet.
This documentation is not final and potentially incomplete.
Query debug packages
If you have an issue with a specific AQL query, you can create a debug package to provide all necessary information to others for investigating the issue
Query debug packages, or debug dumps, facilitate the debugging of issues you might find after executing AQL queries. A debug package is a JSON file that contains information about the query and the environment to make it possible to reproduce the issue:
- General information about the server including the exact version
- The properties of the involved database, collections, Views, and graphs
- The query, its bind variables, and options
- The query execution plan
- Storage engine statistics
- Optionally samples of your data, with the option to obfuscate all string values in a non-reversible way
Before sharing a debug package, open the file locally and check if it contains anything that you are not allowed or willing to share and obfuscate it.
Create a query debug package in the web interface
- In QUERIES section of the web interface, enter an AQL query into the editor and provide the bind parameters if necessary.
- Click Create Debug Package below the text area.
- The download of a compressed debug package starts.
- Unzip the downloaded file if you want to inspect its content.
Create a query debug package with arangosh
Connect to the server with the ArangoDB shell and call
the debugDump()
method of the explainer module. You can specify the output
file path, the AQL query, any bind parameters if necessary, as well as options
for the query, including two additional options to include sample documents,
examples
and anonymize
:
arangosh> var examples = require("@arangodb/graph-examples/example-graph");
arangosh> var g = examples.loadGraph("worldCountry");
arangosh> var query = `FOR v, e, p IN 0..10 INBOUND "worldVertices/continent-europe" GRAPH "worldCountry" FILTER v._key != @country RETURN CONCAT_SEPARATOR(" -- ", p.vertices)`;
arangosh> var bindVars = { country: "country-denmark" };
arangosh> var options = { examples: 10, anonymize: true }
arangosh> var explainer = require("@arangodb/aql/explainer");
arangosh> explainer.debugDump("/tmp/debugDumpFilename", query, bindVars, options);
(Empty output)
See Gathering debug information about a query for details.
Inspect a query debug package with arangosh
The debug package JSON is compactly formatted. To get a more readable output,
you can use a tool for pretty-printing like jq
,
or use the inspectDump()
method of the explainer module for formatting.