Abstract
STREAK is a high-performance RDF engine designed to handle complex SPARQL queries that integrate graph patterns with spatial filters and top-k ranking. By introducing a "soft-schema aware" spatial index called the S-QuadTree and an Adaptive Processing (APS) strategy, STREAK addresses the challenges of schema-less RDF data and non-uniform spatial distributions. Experimental results on massive real-world datasets like YAGO3 and LinkedGeoData demonstrate that STREAK outperforms state-of-the-art systems, including Virtuoso and PostgreSQL, by 1–2 orders of magnitude.
Introduction
As the Semantic Web expands, knowledge bases such as Yago, Wikidata, and LinkedGeoData are increasingly enriched with spatial metadata. Users frequently require complex queries that combine graph relationships with spatial constraints—for example, identifying the top 10 wine-producing regions near major European rivers, ranked by production volume.
Processing such queries in traditional RDF engines is difficult due to three primary factors: the schema-less nature of RDF, which scatters spatial entities across massive triple tables; the difficulty of early termination in top-k spatial joins; and the non-uniform distribution of spatial data, which often renders static query plans inefficient. STREAK was developed to overcome these bottlenecks through specialized indexing and dynamic query optimization.
Methodology
S-QuadTree: Soft-Schema Aware Indexing
Standard spatial indexes like QuadTrees typically only consider coordinates. STREAK introduces the S-QuadTree, which is "soft-schema aware." This index stores Characteristic Sets (CS) at each node, allowing the engine to know not just the location of objects, but also their types (e.g., identifying that a specific quadrant contains both 'Rivers' and 'Vineyards').
The S-QuadTree utilizes a unique (S, Z, I, L) bit-encoding for identifiers to capture hierarchy and Z-order, ensuring that spatially proximate objects are stored near each other on disk to improve cache locality. Furthermore, it employs I-Ranges (for objects fully contained within a node) and E-Lists (for objects overlapping boundaries) to prune irrelevant data blocks during join operations.
Adaptive Processing for Spatial Filters (APS)
To handle data skew and the unpredictability of spatial join costs, STREAK employs an Adaptive Processing (APS) strategy. Rather than committing to a single static query plan, the APS engine evaluates and switches plans at runtime with zero switching cost.
The system processes data in blocks and chooses between two primary strategies:
- N-Plan: Prioritizes numerical filters (e.g., production volume) to prune results based on rank thresholds.
- S-Plan: Prioritizes the spatial join to eliminate candidates based on distance constraints.
A cost model re-evaluates the optimal strategy for every new block of data retrieved, allowing the system to adapt as it moves between dense urban and sparse rural data regions.
Evaluation and Results
STREAK was evaluated using the YAGO3 Core (~85 million quads) and Linked Geo Data (~324 million quads) datasets across 16 custom benchmark queries.
Key findings include:
- Performance: STREAK outperformed Virtuoso and PostgreSQL (PostGIS) by 1 to 2 orders of magnitude in both cold and warm cache scenarios.
- Pruning Efficiency: The S-QuadTree generated up to 100x fewer candidate results than standard R-tree traversal methods by leveraging its knowledge of data types within spatial regions.
- Index Compactness: The S-QuadTree index is highly efficient, occupying only 0.04% to 2% of the raw data size.
- Scalability: The system maintained high performance even as the result count (k) increased, demonstrating the effectiveness of the APS cost model in maintaining early termination properties.
Conclusion
STREAK demonstrates that integrating soft-schema awareness into spatial indexing and employing block-wise adaptive processing can significantly accelerate top-k spatial SPARQL queries. Future work will explore hardware-specific optimizations, such as vectorized processing, and the integration of spatial processing with RDF reasoning to infer new facts from spatial relationships.
Summary updated