TL;DR
This paper introduces Chimera, a novel system designed to efficiently process SQL/PGQ queries by employing a dual-store architecture (one for graph topology, one for properties) and a unified "Traversal-Join" operator. This approach significantly outperforms existing graph-relational database systems in terms of response time and throughput, especially for interactive graph queries.
What Problem Does This Paper Address?
The increasing use of graph data in various industries has led to the standardization of SQL with Property Graph Queries (SQL/PGQ) within the SQL:2023 standard. While existing approaches attempt to integrate graph query processing into relational database management systems (RDBMSs), they often struggle with performance, particularly for interactive queries that demand low response times and high throughput. These systems either rely on defining graph views within RDBMSs (Graph Table - GT approach), which leads to costly joins for topology operations, or they materialize graph views (Materialized Graph View - MGV approach), which suffer from limitations in graph size, data recency, and inefficient handling of hybrid queries (combining topology and property operations). Chimera aims to bridge this gap by providing an efficient and scalable solution for SQL/PGQ processing within an RDBMS framework.
Methods
Chimera introduces a dual-store architecture that separates graph topologies (vertices and edges) into a dedicated "graph store" and their associated properties into the traditional "relational store." This separation allows each store to use optimized data formats and access methods. Crucially, Chimera maintains pointers between the graph store and the relational store, enabling efficient lookups.
The core innovation is the Traversal-Join (TJ) operator. This unified operator can perform traversal, join, or mapping operations, seamlessly handling operands from both the graph and relational stores. This allows Chimera to generate a single, efficient query plan that mixes topology and property operations, unlike existing systems that often use separate processing layers.
To optimize these unified plans, Chimera proposes a novel cost model specifically tailored for the TJ operator and an optimization method that considers the interplay between traversal and join operations. The system is implemented by extending PostgreSQL with new access methods, traversal operators, and the TJ operator.
Datasets
The paper uses the LDBC Social Network Benchmark (SNB) dataset for evaluation. This benchmark is a de-facto standard for graph query workloads and includes various types of queries (Interactive Complex, Interactive Short) and scale factors (SF=30, SF=100, SF=300). The authors also created four micro-benchmark queries to specifically analyze the performance of topology-only and hybrid queries under different selectivities and cardinalities.
Key Insights and Ideas
- Dual-store architecture is key: Separating graph topology from properties allows for specialized optimization for each, while maintaining a link between them ensures efficient hybrid query processing.
- The Traversal-Join (TJ) operator is a game-changer: By unifying traversal, join, and mapping into a single operator, Chimera simplifies query processing and optimization, avoiding the inefficiencies of separate stacks.
- Topologies as first-class citizens: Unlike MGV approaches that extract topologies as secondary elements, Chimera treats them as primary, leading to better performance and scalability.
- Disk-based graph store for scalability: By storing graph topologies on disk rather than in memory, Chimera overcomes the graph size limitations inherent in many MGV approaches.
- Unified query planning unlocks performance: The ability to generate a single, optimized plan for mixed topology and property operations is critical for achieving high performance in interactive graph queries.
Key Results
Chimera significantly outperforms existing systems:
- Response Time: Chimera-TJ shows substantial improvements, outperforming GT-based systems like Agensgraph and SQL SG by up to 1785x for interactive complex queries. It also significantly outperforms MGV-based systems like DuckPGQ and GrainDB.
- Throughput: Chimera-TJ achieves up to 779x higher throughput compared to SQL SG in mixed query workloads. It demonstrates excellent scalability, with a 4x throughput improvement under a hard query mix (increased connections and workload intensity).
- Scalability: Chimera handles large datasets (SF=300) without out-of-memory issues, a common problem for MGV approaches.
- Storage Overhead: Chimera's disk-based graph store has a manageable storage overhead, comparable to or less than some MGV approaches, and significantly less than the memory required for materialized views.
Limitations and Future Work
- Fault Tolerance and High Availability: The paper acknowledges that aspects like fault tolerance and high availability for the graph store may need further development, as they are not fully addressed by leveraging the base RDBMS's capabilities.
- Future Work: The authors suggest focusing on reinventing fault tolerance and high availability mechanisms for the graph store as a key area for future research.
Summary updated