Skip to main content
QUICK REVIEW

[Paper Review] Join Processing for Graph Patterns: An Old Dog with New Tricks

Dung T. Nguyen, Molham Aref|arXiv (Cornell University)|Mar 13, 2015
Advanced Database Systems and QueriesComputer Science15 references6 citations
TL;DR

This paper evaluates worst-case optimal and beyond-worst-case join algorithms—LeapFrog TrieJoin (LFTJ) and Minesweeper—within a full-featured RDBMS (LogicBlox) for graph-pattern matching. It demonstrates that these modern join algorithms enable relational databases to outperform both traditional relational systems and specialized graph databases on cyclic and acyclic graph queries, closing the performance gap with graph engines while retaining high-level SQL interfaces.

ABSTRACT

Join optimization has been dominated by Selinger-style, pairwise optimizers for decades. But, Selinger-style algorithms are asymptotically suboptimal for applications in graphic analytics. This suboptimality is one of the reasons that many have advocated supplementing relational engines with specialized graph processing engines. Recently, new join algorithms have been discovered that achieve optimal worst-case run times for any join or even so-called beyond worst-case (or instance optimal) run time guarantees for specialized classes of joins. These new algorithms match or improve on those used in specialized graph-processing systems. This paper asks can these new join algorithms allow relational engines to close the performance gap with graph engines? We examine this question for graph-pattern queries or join queries. We find that classical relational databases like Postgres and MonetDB or newer graph databases/stores like Virtuoso and Neo4j may be orders of magnitude slower than these new approaches compared to a fully featured RDBMS, LogicBlox, using these new ideas. Our results demonstrate that an RDBMS with such new algorithms can perform as well as specialized engines like GraphLab -- while retaining a high-level interface. We hope this adds to the ongoing debate of the role of graph accelerators, new graph systems, and relational systems in modern workloads.

Motivation & Objective

  • To investigate whether modern, theoretically optimal join algorithms can close the performance gap between relational databases and specialized graph processing engines for graph-pattern queries.
  • To evaluate the practical performance of worst-case optimal (LFTJ) and beyond-worst-case (Minesweeper) join algorithms in a real-world RDBMS setting.
  • To determine under which query and data characteristics these new algorithms outperform traditional Selinger-style optimizers and graph-specific systems.
  • To assess the feasibility of unifying OLAP and graph analytics workloads within a single relational engine using advanced join algorithms.

Proposed method

  • Implementation and integration of LeapFrog TrieJoin (LFTJ), a worst-case optimal multiway join algorithm, into the LogicBlox RDBMS.
  • Implementation of Minesweeper, a beyond-worst-case optimal join algorithm, which uses intelligent indexing and caching to minimize redundant computation.
  • Benchmarking against a diverse set of systems: row-store (PostgreSQL), column-store (MonetDB), graph databases (Virtuoso, Neo4j), and graph processing engines (GraphLab, RedShift, System HC).
  • Evaluation on real-world graph workloads including cliques, paths, trees, and hybrid patterns (e.g., lollipops) across multiple datasets (LiveJournal, Pokec, Orkut).
  • Use of sampling and edge-subset scaling experiments to analyze performance and scalability under varying data sizes and selectivity levels.
  • Design and evaluation of a hybrid algorithm combining LFTJ and Minesweeper to leverage strengths of both in mixed-query scenarios.

Experimental results

Research questions

  • RQ1Can worst-case optimal and beyond-worst-case join algorithms enable a full-featured RDBMS to match or exceed the performance of specialized graph engines on graph-pattern queries?
  • RQ2How do LFTJ and Minesweeper perform relative to traditional Selinger-style optimizers and graph-specific systems across different types of graph queries (acyclic vs. cyclic)?
  • RQ3In what query and data regimes does Minesweeper’s caching mechanism provide a measurable performance advantage over LFTJ?
  • RQ4To what extent do these new join algorithms scale with increasing data size, especially under low selectivity or high redundancy?
  • RQ5Can a hybrid algorithm combining LFTJ and Minesweeper outperform both individual algorithms on mixed-structure queries?

Key findings

  • LogicBlox with LFTJ and Minesweeper outperforms PostgreSQL, MonetDB, Virtuoso, Neo4j, and GraphLab on cyclic graph queries by orders of magnitude.
  • LFTJ achieves the fastest performance on cyclic queries such as 3-clique and 4-cycle, especially on dense data and high-selectivity scenarios.
  • Minesweeper excels on acyclic queries like 1-tree and 2-tree, particularly benefiting from its caching mechanism in low-selectivity regimes where redundant work is high.
  • For hybrid queries combining path and clique structures (e.g., i-lollipop), the hybrid algorithm outperforms both LFTJ and Minesweeper, suggesting significant optimization potential.
  • Traditional relational databases (PostgreSQL, MonetDB) and Neo4j time out on many graph-pattern queries, even with small data subsets, highlighting their inefficiency for such workloads.
  • Scaling experiments show that optimal join algorithms handle datasets two orders of magnitude larger than conventional systems, with LFTJ supporting graphs an order of magnitude larger than Minesweeper.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.