Efficient Data Collection with Hash Tables: ArangoDB Insights

ArangoDB 2.6 will feature an alternative hash implementation of the AQL COLLECT operation. The new implementation can speed up some AQL queries that can not exploit indexes on the COLLECT group criteria.

This blog post provides a preview of the feature and shows some nice performance improvements. It also explains the COLLECT-related optimizer parts and how the optimizer will decide whether to use the new or the traditional implementation.

(more…)

More info...

Creating Multi-Game Highscore Lists: ArangoDB Techniques

I just came across a question about how to create highscore lists or leaderboards in ArangoDB, and how they would work when compared to Redis sorted sets.

This blog post tries to give an answer on the topic and also detailed instructions and queries for setting up highscore lists with ArangoDB. The additional section “Extensions” explains slightly more advanced highscore list use cases like multi-game highscore lists, joining data and maintaining a “last updated” date.
(more…)

More info...

Git Commit Analysis with ArangoDB: Insightful Data Exploration

I often find myself searching for certain commits using git log and friends. While I really love the power and flexibility that come with the git and other Unix command-line tools, sometimes it can be more convenient to use a database to filter and aggregate commit data.

I gave it a quick try yesterday and imported the commit history of ArangoDB’s Git repository into ArangoDB and ran some queries on the data.

// retrieving number of commits per month / year
query = 'FOR commit IN commits 
           COLLECT year = DATE_YEAR(commit.date), month = DATE_MONTH(commit.date) 
           WITH COUNT INTO count 
         RETURN { month: CONCAT(year, "/", month), count: count }';
db._query(query).toArray();

While the query results for our repository may not be interesting for everyone, I think it is still worth sharing what I did. Even though I didn’t try it, I think the overall procedure is applicable with any other Git repository.

More queries and how to convert and import Git commits in ArangoDB: Read on in Jan’s Blog

More info...

Enhanced AQL in ArangoDB 2.5: Improved Query Capabilities

Contained in 2.5 are some small but useful AQL language improvements plus several AQL optimizer improvements.

We are working on further AQL improvements for 2.5, but work is still ongoing. This post summarizes the improvements that are already completed and will be shipped with the initial ArangoDB 2.5 release.

(more…)

More info...

ArangoDB Optimizer Rule: Efficient Calculations

In the upcoming ArangoDB 2.5 (current devel branch) a new optimizer rule move-calculations-down was added. Jan showcases in his latest blog post how queries with calculations could benefit from this new optimiser rule.

move-calculations-down

Read in Jan’s blog how this rule could accelerate your queries

More info...

ArangoDB Query Builder: Simplifying Database Queries

The most powerful way to query your data in ArangoDB is by using ArangoDB’s own query language, AQL. In the past using AQL in your JavaScript code sadly would often require writing long, unwieldy strings. This made writing complex queries difficult and could often lead to subtle syntax errors or mistakes.

The ArangoDB Query Builder (AQB) is a JavaScript node packaged module that provides a fluid API for writing AQL queries in plain JavaScript. And if you’re using ArangoDB 2.3, the aqb module is already available to your Foxx applications. (more…)

More info...

Enhanced AQL in ArangoDB 2.4: Boost Query Performance

While on a retreat in Belgium, we found some spare time to work on improvements for AQL. These will be shipped with ArangoDB version 2.4, and are already available in the devel version for testing from now on.

Here’s a short overview of the improvements:

Collect with count

A common use case in query languages is to count the number of documents returned by a query. The AQL solution for this has been to use the LENGTH function and a subquery:

RETURN LENGTH((
  FOR doc IN collection 
    FILTER doc.someAttribute == someValue
    RETURN doc
  ))

This is quite long and probably unintuitive for people which have used SQL for years.

We therefore now allow using the following alternative version:

Read more on Jan’s Blog

More info...

ArangoDB Java Driver for Graphs: Enhanced Functionality

After defining a graph and filling it with some vertices and edges (see part 1), the time has come to retrieve information out of the graph.

Please take a look at the defined graph operations of ArangoDB. These will be the base for our next examples. (Yes, there may be other ways to get the results, this post does not claim completeness!)

We will start with some easy stuff and then smoothly advance in complexity.

Question: “How many edges are defined within the graph?”

(more…)

More info...

Tour Around the New AQL Query Optimizer | ArangoDB Blog

The major new feature in ArangoDB 2.3 is the shiny new AQL query optimizer and executor. These parts of ArangoDB have been rewritten in 2.3 to make AQL much better for our end users.

Since one of the initial releases, ArangoDB has been shipped with AQL, the ArangoDB Query Language. AQL has since then been ArangoDB’s most versatile way of executing simple and also the not-so-simple queries.

I’ll start with an overview of query execution in previous versions of ArangoDB, and then explain the new engine and explain the differences.

Read more on Jan’s Blog

More info...

Data Modeling: MongoDB vs ArangoDB | ArangoDB Blog

MongoDB is a document DB whereas ArangoDB is a multi-model DB supporting documents, graphs and key/values within a single database. When it comes to data modeling and data querying, they pursue somewhat different approaches.


In a Nutshell: In MongoDB, data modeling is “aggregate-oriented”, avoiding relations and joins. On the other side, everybody has probably used relational databases which organize the data in tables with relations and try to avoid as much redundancy as possible. Both approaches have their pros and cons. ArangoDB is somewhat in-between: You can both model and query your data in a “relational way” but also in an “aggregate-oriented way”, depending on your use case. ArangoDB offers joins, nesting of sub-documents and multi-collection graphs. (more…)

More info...

Get the latest tutorials,
blog posts and news: