ArangoDB 2.6 (alpha3)
Estimated reading time: 3 minutes
The 2.6 release preparations are on track: with a 3rd alpha release available for testing purposes today. Please download the latest alpha build and provide us your valuable feedback.
We put great efforts in speeding-up core ArangoDB functionality to make AQL queries perform much better than in earlier versions of ArangoDB.
The queries that improved most in 2.6 over 2.5 include:
FILTERconditions: simpleFILTERconditions we’ve tested are 3 to 5 times faster- simple joins using the primary index (
_keyattribute), hash index or skiplist index are 2 to 3.5 times faster - sorting on a string attribute is 2.5 to 3 times faster
- extracting the
_keyor other top-level attributes from documents is 4 to 5 times faster COLLECTstatements: simpleCOLLECTstatements we’ve tested are 7 to 15 times faster
More details on the performance improvements and the test-setup will be published in a follow-up blog post. For now, try out 2.6 alpha3 version – we’ve done our very best to make ArangoDB a lot faster. ; )
What’s new in ArangoDB 2.6
For a full list of changes and improvements please consult the change-log. Over the next week we might also add some more functionality to 2.6, mainly some improvements in the shortest-path implementation and other graph related AQL queries.
Some main features:
- Added AQL
UPSERTstatement to AQL that is a combination of bothINSERTandUPDATE/REPLACE. TheUPSERTwill search for a matching document using a user-provided example. If no document matches the example, the insert part of theUPSERTstatement will be executed. If there is a match, the update / replace part will be carried out:UPSERT { page: 'index.html' } /* search example */ INSERT { page: 'index.html', pageViews: 1 } /* insert part */ UPDATE { pageViews: OLD.pageViews + 1 } /* update part */ IN pageViews - ArangoDB now provides a dedicated collection export API, which can take snapshots of entire collections The export API is available at endpoint
POST /_api/export?collection=.... The API has the same return value structure as the already established cursor API (POST /_api/cursor). Read more in the export documentation. - Alternative implementation for
AQL COLLECTthat uses a hash table for groupingThe alternative method uses a hash table for grouping and does not require its input elements to be sorted. It will be taken into account by the optimizer forCOLLECTstatements that do not use anINTOclause. - make fulltext index also index text values contained in direct sub-objects of the indexed attribute.Previous versions of ArangoDB only indexed the attribute value if it was a string. Sub-attributes of the index attribute were ignored when fulltext indexing.
Now, if the index attribute value is an object, the object’s values will each be included in the fulltext index if they are strings. If the index attribute value is an array, the array’s values will each be included in the fulltext index if they are strings.
For example, with a fulltext index present on the
translationsattribute, the following text values will now be indexed:var c = db._create("example"); c.ensureFulltextIndex("translations"); c.insert({ translations: { en: "fox", de: "Fuchs", fr: "renard", ru: "лиса" } }); c.insert({ translations: "Fox is the English translation of the German word Fuchs" }); c.insert({ translations: [ "ArangoDB", "document", "database", "Foxx" ] }); c.fulltext("translations", "лиса").toArray(); // returns only first document c.fulltext("translations", "Fox").toArray(); // returns first and second documents c.fulltext("translations", "prefix:Fox").toArray(); // returns all three documents - Added batch document removal and lookup commands
collection.lookupByKeys(keys) collection.removeByKeys(keys)
There are several more great features and improvements in 2.6 alpha2, just read on in the changelog.
We have a couple of changes in the API as well as changed behavior in 2.6, also stated in the changelog.
Known issues in alpha2
The following issues in alpha2 are already fixed in devel and will be part of the next alpha release:
- (already fixed in devel): starting the server may print errors about non-existing collections when there exist multiple databases
- (already fixed in devel): memleak in server queues manager, leading to the server continuously leaking a small amount of memory
- (already fixed in devel): when arangod is run with authentication turned on: Cookie authentication for web interface may fail after a restart of the server. web interface may not work properly when authentication is turned on
- (already fixed in devel): cluster crashes when creating an edge collection

Leave a Comment