Database Query Execution Pipelining to Reduce Memory Copies

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database management systems face challenges in optimizing performance for complex queries due to the need to handle various database types and types of operations, which can lead to increased processing and memory resource usage, reducing response times and efficiency.

Innovation Solution

A database execution engine is introduced that decouples the application layer from the database layer, optimizing query plans and executing queries using pre-compiled and just-in-time generated code, and employing pipelining to reduce memory copies and improve locality, allowing it to handle different database types and operations efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a database management system handles complex multidimensional analysis queries, then analytical capability is improved, but processing time and memory resource usage increase

Engineering Contradiction:
Improveanalytical capabilityVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The query execution is divided into multiple operator stages (scan operators, filter operators, aggregate operators, etc.) that process data in discrete steps. Each operator handles a specific transformation task, allowing complex queries to be broken down into manageable segments that can be optimized independently.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs query optimization and execution plan generation before actual query execution. The query optimizer analyzes the query structure, selects appropriate operators, and determines execution strategies in advance, preparing the system to execute complex analytical queries more efficiently when they are actually run.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If a database management system handles high volume transactions, then transaction throughput is improved, but response time deteriorates

Engineering Contradiction:
Improvetransaction throughputVSAvoidresponse time
Core Design Contradiction:
ProductivityVSSpeed

Solution Approach 1:

The query execution engine maintains continuous operation by processing transactions through a pipeline of operators. Data flows continuously through scan, filter, aggregate, and output operators without idle periods, maximizing resource utilization and maintaining high transaction throughput while ensuring timely responses.

Inventive Principle:
Principle #20Continuity of useful action

Solution Approach 2:

The system dynamically adjusts query execution strategies based on query characteristics, data distribution, and system state. The query optimizer selects different execution plans and operator configurations adaptively, allowing the system to handle varying transaction volumes and maintain optimal response times under different load conditions.

Inventive Principle:
Principle #15Dynamics

3Adaptability or versatility

If the database layer handles various database types and operations, then versatility is improved, but processing burden and complexity increase

Engineering Contradiction:
Improvedatabase type compatibilityVSAvoidexecution engine complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The query execution engine implements a universal operator framework that can handle multiple database types and operations through a common set of operator templates. Scan operators, filter operators, aggregate operators, and other execution operators are designed to work across different database structures and query types, eliminating the need for separate specialized execution engines for each database type.

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

Solution Approach 2:

The operator-based execution framework serves as an intermediary layer between the query optimizer and the underlying database storage systems. This intermediate operator layer abstracts the complexities of different database types, allowing the system to handle various database structures uniformly through standardized operator operations without exposing the full complexity to either the query interface or storage layer.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10733184B2Query planning and execution with source and sink operators
Publication Date: 2020.08.04 SAP SE
  • US10733184B2 patent drawing
  • US10733184B2 patent drawing
  • US10733184B2 patent drawing

AI summary

A system for query planning and execution with source and/or sink operators is provided. In some implementations, the system performs operations comprising identifying a plurality of operators for executing a query, allocating space in memory for storing data when a second operator comprises a collection operator for collecting the data, generating at least a portion of the data based on executing a first operator, and providing the data (e.g., access to the data) to another operator which occurs after the first operator. In some implementations, a query plan for execution of the query can be generated to include the first operator and exclude the collection operator. Related systems, methods, and articles of manufacture are also described.