Dataflow Graph Optimization for SQL Query Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database management systems face challenges in efficiently processing SQL queries in graph-based systems, as they often lack built-in functionality to execute SQL queries directly, requiring conversion of SQL queries into dataflow graphs for execution.

Innovation Solution

A method and system for generating a dataflow graph representing a database query by receiving a query plan, producing a dataflow graph from the plan, and altering its components based on the characteristics of the input data sources, including merging or removing operations to optimize the graph, thereby enabling efficient execution of SQL queries in graph-based database management systems.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If SQL queries are converted into dataflow graphs for execution in graph-based systems, then compatibility with diverse data sources is achieved, but the complexity of query processing increases due to the conversion overhead and graph construction requirements

Engineering Contradiction:
Improvecompatibility with diverse data sourcesVSAvoidquery processing complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary system that translates SQL queries into dataflow graphs, acting as a mediator between the query interface and the graph-based execution engine. This intermediary handles the conversion complexity internally while presenting a simple SQL interface to users, thus resolving the contradiction between versatility and complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The query processing system is segmented into distinct modules: SQL parser, dataflow graph generator, optimization module, and execution engine. Each module handles specific aspects of query processing independently, reducing overall system complexity while maintaining adaptability to diverse data sources through standardized interfaces.

Inventive Principle:
Principle #1Segmentation

2Productivity

If dataflow graphs are optimized by merging or removing components based on input characteristics, then execution performance is improved, but the time required for graph optimization increases

Engineering Contradiction:
Improvequery execution performanceVSAvoidgraph optimization time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary optimization of dataflow graphs by analyzing input data characteristics and pre-computing optimal graph configurations before actual query execution. This preliminary action reduces the optimization burden during runtime, thus improving execution performance while managing optimization time through advance preparation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The optimization process dynamically changes parameters of the dataflow graph based on input data characteristics, such as data size, data types, and distribution patterns. By adjusting graph structure parameters adaptively, the system achieves better execution performance without requiring exhaustive optimization for all possible input scenarios.

Inventive Principle:
Principle #35Parameter changes

3Manufacturing precision

If the dataflow graph includes detailed operations from the query plan, then query accuracy is maintained, but the number of components in the graph increases leading to slower execution

Engineering Contradiction:
Improvequery execution accuracyVSAvoidquery execution speed
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The patent merges adjacent operations in the dataflow graph that can be combined into single equivalent operations, reducing the total number of components while preserving the semantic meaning and accuracy of the original query. This merging process maintains query accuracy by ensuring that combined operations produce identical results to the sequence of individual operations.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The system extracts and removes redundant operations from the dataflow graph that do not contribute to the final query result. By identifying and eliminating unnecessary components such as duplicate transformations or operations with identity effects, the graph size is reduced while maintaining query accuracy.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP4216069A1Managing data queries
Publication Date: 2023.07.26 AB INITIO TECHNOLOGY LLC
  • EP4216069A1 patent drawingFigure 1
  • EP4216069A1 patent drawingFigure 2
  • EP4216069A1 patent drawingFigure 3

AI summary

In one aspect, in general, a method of generating a dataflow graph representing a database query includes receiving a query plan from a plan generator, the query plan representing operations for executing a database query on at least one input representing a source of data, producing a dataflow graph from the query plan, wherein the dataflow graph includes at least one node that represents at least one operation represented by the query plan, and includes at least one link that represents at least one dataflow associated with the query plan, and altering one or more components of the dataflow graph based on at least one characteristic of the at least one input representing the source of data.