home shape

Using the WebUI AQL Editor – Basics

The ArangoDB query language (AQL) can be used to retrieve and modify data that is stored in ArangoDB. The AQL editor in the web interface is useful for running ad hoc AQL queries and trying things out.

The editor is split into three parts. The center section allows you to write your query and modify your query bind parameters. At the bottom you can either run the query or explain it, allowing to explain the query and inspect its execution plan. This can be used to check if the query uses indexes, and which. Here more information about optimizing a query.

Each query you execute or explain opens up a new result box, so you are able to fire up multiple queries and view their results at the same time. Every query result box gives you detailed query information (e.g. query profiling information, total amount of returned values) and of course the query result itself.

At the top you are able to manage custom defined queries and store them into your database. Also one can limit the total amount of returned queries or use the magic wand icon to search for collections (filtered by their type), AQL keywords and AQL functions to help you to be more productive in writing your queries.

Queries which require more than 10.0 seconds for their execution are marked as slow queries by default. You can find those listed in the Slow Query History tab. Queries which appear in that list might need more attention as they could potentially run much faster.

In case the default value of 10.0 seconds is not fitting into your production/development setup, you are of course allowed to change the slow query parameter via the ArangoDB Shell. Following example is setting the slow query threshold to one (1.0) second.

var queries = require("@arangodb/aql/queries");  // require queries module
queries.properties({slowQueryThreshold: 1});       // set slow query value to 1 second
queries.properties();                         		        // optional: print all query settings

The Running Queries section offers a list of all currently running queries. The information per query is identical as it is inside the Slow Query Section (Available query information: ID, query string, bind parameter, runtime and starttime).

To get more detailed info about the query editor please check here.

Heiko Kernbach avatar 1518160583 92x92

Heiko Kernbach

Heiko is a JavaScript and C++ Developer working on ArangoDB’s frontend and backend. He holds a Bachelor degree in Computer Science and is passionate about new technologies and programming. Whilst completing his Bachelor degree, Heiko dived deeper into ArangoDB and focused on developing geo location-based services.

Leave a Comment

Get the latest tutorials, blog posts and news: