With MAGE there is a lot of graph algorithms I can implement and run within Memgraph. Why and when would that not be sufficient? If I would need to create my own function which programing languages are supported?
2 Answers
Answer for title:
Writing procedures for use by (any) database engine is recommended in 2 cases:
- When using it will significantly speed up the operation.
- When you have several clients (especially in different languages) and you need to ensure that the operations are the same.
Writing code in your favorite language is faster - it's a fact. This is usually not the most optimal development solution, but the most economically viable.
Answer for body
Write your procedure when the developers of MAGE have not come up with an idea to solve your specific problem.
All languages that can be compiled to ELF are supported.

- 2,695
- 1
- 18
- 26
Memgraph has the ability to load custom functions written in C/C++ or Python. This custom functions then can be called from any Cypher expressions. Semantically spekaing, functions should be a small fragment of functionality that con't require long computations and large memory consumption. There is one limitation in place: the only requirement for functions is not to modify the graph.
Memgraph MAGE has many pre-defined functions as a part of the MAGE project. In addition to MAGE off-the-shelf functions, you also can optimize performance because, e.g., precompiled C++ functions can massively increase filter expression speed. This will be very useful if you are working with large filter expressions where filtering takes most of the time.

- 942
- 1
- 1
- 11