Multi-Query Optimization for SPARQL via Structural Overlap

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing RDF data storage systems face challenges in efficiently optimizing SPARQL queries due to the complexity of RDF data structures and the high error rate in cost estimation for query operators, particularly with increased join operations, which hinders multi-query optimization (MQO) across different RDF stores.

Innovation Solution

A generic MQO technique for SPARQL queries is developed, utilizing query rewriting and cost modeling to identify common substructures and optimize query execution, ensuring consistent performance across various RDF stores by caching and reusing results, and employing algorithms to find structural overlaps and optimize query clusters.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If query rewriting and structural overlap identification techniques are applied to optimize SPARQL queries, then query execution time is reduced, but the complexity of the optimization system increases

Engineering Contradiction:
Improvequery execution timeVSAvoidoptimization system complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The optimization system segments the query processing into distinct phases: query parsing, structural analysis, common subquery identification, and execution optimization. This modular approach manages complexity by breaking down the overall optimization task into manageable components that can be independently implemented and maintained.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary analysis of query structures before execution, identifying common subqueries and computing cost estimates in advance. This preliminary action enables the system to optimize multiple queries by preparing optimization strategies beforehand, reducing actual execution time while managing complexity through advance preparation.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If cost estimation for query operators is improved to enable multi-query optimization, then query optimization accuracy is enhanced, but the error rate in cost estimation increases with more join operations

Engineering Contradiction:
Improvecost estimation accuracyVSAvoidcost estimation reliability
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The system introduces an intermediary cost estimation module that acts as a mediator between query structure analysis and optimization decision-making. This intermediary component uses statistical models and historical data to compensate for the increased error rates in complex join operations, providing more reliable cost estimates that enable accurate multi-query optimization despite the inherent complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If a generic MQO framework is implemented to work across different RDF stores, then adaptability is improved, but the difficulty of integrating with diverse RDF data structures increases

Engineering Contradiction:
Improvecross-store compatibilityVSAvoidintegration complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The optimization framework implements universal interfaces and abstraction layers that enable it to work with multiple different RDF store implementations. By designing generic cost estimation and query analysis components that can adapt to various data structures (triples, property graphs, vertical partitions), the system achieves cross-store compatibility while managing integration complexity through standardized interaction protocols.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10095742B2Scalable multi-query optimization for SPARQL
Publication Date: 2018.10.09 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10095742B2 patent drawing
  • US10095742B2 patent drawing
  • US10095742B2 patent drawing

AI summary

Multiquery optimization is performed in the context of RDF/SPARQL. Heuristic algorithms partition an input batch of queries into groups such that each group of queries can be optimized together. The optimization incorporates an efficient algorithm to discover the common sub-structures of multiple SPARQL queries and an effective cost model to compare candidate execution plans. No assumptions are made about the underlying SPARQL query engine. This provides portability across different RDF stores.