OQGRAPH Engine for MySQL, MariaDB and Drizzle
What OQGRAPH is, who built it, and when to use it for hierarchies and networks in SQL.
OQGRAPH (Open Query GRAPH) is a computation engine for hierarchical and network data inside MySQL-family servers. Created by Arjen Lentz and Antony Curtis. Released as a MySQL-era extension; carried as a MariaDB plugin. Drizzle packages existed while that fork was alive.
Problem
Adjacency lists are easy to write and expensive to traverse in pure SQL. Nested sets and path enumerations invert the trade-off. OQGRAPH keeps a normal edge table and exposes algorithms — dijkstras, breadth_first, leaves — as queries.
Install
INSTALL SONAME 'ha_oqgraph';
SHOW ENGINES;Install the distro plugin package first, then load. Create backing + OQGRAPH tables as documented on /graph/doc. Confirm the engine lists with support YES.
Properties
- GPL; inspectable source
- Works with ordinary SQL clients and ORMs
- Same backup and replication plane as the server
- Optional edge weights for cost-aware shortest paths
Not for
- Billion-edge analytical graph warehouses
- Rich property-graph documents with many vertex attributes as first-class storage (use a dedicated graph DB)
Product page: /products/graph-engine · Examples: examples