Query Runtime Error Position Tracking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging runtime errors in database management systems is cumbersome and time-consuming due to the lack of precise position information for symbols causing the errors in long and complex queries.

Innovation Solution

A system and method that provide position information for runtime errors by scanning queries to determine the position of symbols, incorporating this information into a parse tree, optimizer tree, and query execution plan, and including it in exception messages to facilitate error debugging.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If position information is not provided for runtime errors, then the error message structure remains simple, but debugging becomes cumbersome and time-consuming

Engineering Contradiction:
Improvedebugging easeVSAvoiddebugging time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent applies preliminary action by determining and storing position information of query symbols during the parsing phase, before runtime errors occur. The parser assigns position data to each symbol in the query, and this information is preserved through the optimization stages and included in runtime error messages, eliminating the need for additional error analysis during execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses the parse tree as an intermediary structure that carries position information from the parsing stage through to the query execution stage. The position information is embedded in the parse tree nodes and transferred through the optimization process, serving as a mediator that connects the original query structure with the final error reporting mechanism.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If position information is tracked through parse tree and optimizer tree, then error location precision is improved, but system complexity increases

Engineering Contradiction:
Improveerror position precisionVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent merges position information tracking with the existing parse tree and optimizer tree structures. Instead of creating separate tracking mechanisms, the position data is integrated into the node structures of these existing trees, allowing precision error location without adding separate complex systems for tracking.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The parse tree and optimizer tree structures serve multiple functions: they perform their traditional roles in query processing while simultaneously carrying position information for error tracking. This multi-functionality eliminates the need for dedicated error tracking structures, reducing overall system complexity while maintaining precision.

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

Data Source

PatentUS10324929B2Provision of position data for query runtime errors
Publication Date: 2019.06.18 SAP SE
  • US10324929B2 patent drawing
  • US10324929B2 patent drawing
  • US10324929B2 patent drawing

AI summary

A query is parsed and positions of symbols of the query are determined. A parse tree including the positions of the symbols is generated based on the parsed query. The parse tree is sent to a DBMS optimizer. The parse tree is transformed into an optimizer tree. The optimizer tree includes the positions of the symbols of the query.Based on the optimizer tree, a query execution plan is generated for the execution of the query. The positions of the symbols of the query is copied from the optimizer tree into the query execution plan. The query execution plan is sent to a query execution engine.The query is executed in accordance with the query execution plan. When a runtime error is detected, an exception message associated with the runtime error is displayed. The error message includes an error code and the positions of the symbols of the query.