Function Descriptors for Cross-Platform Query Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Data processing systems face challenges in optimizing queries that invoke data set functions (DSFs) due to unknown properties such as output schema, required input columns, and predicate evaluation, leading to inefficiencies in data transfer and query execution.

Innovation Solution

The introduction of function descriptors expressed in markup language, which define properties of DSFs, allowing the database system to infer and optimize query execution by specifying output schema, input schema, predicate push, and cardinality estimation, thereby reducing data transfer and improving query planning.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the database system executes DSFs as blackboxes without property knowledge, then the system can maintain simplicity and avoid complex property specification mechanisms, but query optimization is limited and data transfer efficiency is poor

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidproperty specification mechanism
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The function descriptor is defined and registered before the DSF execution occurs. This preliminary specification of input schema, output schema, and predicate push capabilities allows the query optimizer to make informed decisions during query compilation and execution planning, eliminating the need for runtime property discovery mechanisms.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The function descriptor acts as an intermediary information carrier between the DSF definition and the query optimizer. It mediates the communication by providing structured metadata about the DSF's input/output schemas and optimization capabilities, enabling the optimizer to generate efficient execution plans without direct inspection of the DSF implementation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Quantity of substance

If the database system transfers all input columns to the DSF, then the DSF can process complete data without missing information, but data transfer volume increases and network bandwidth is consumed

Engineering Contradiction:
Improvedata transfer volumeVSAvoiddata completeness
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The input schema specification in the function descriptor allows the query optimizer to extract and send only the necessary columns required by the DSF, excluding redundant columns. This selective data transfer reduces network bandwidth consumption while ensuring the DSF receives exactly the information it needs for correct processing.

Inventive Principle:
Principle #2Taking out (Extraction)

3Ease of manufacture

If the database system does not know the output schema of the DSF, then the system avoids complex schema negotiation protocols, but query compilation and result processing are inefficient

Engineering Contradiction:
Improveschema negotiationVSAvoidquery compilation efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The output schema is pre-specified in the function descriptor during DSF registration. This advance declaration eliminates the need for runtime schema negotiation between the database system and coprocessor, allowing the query compiler to immediately generate efficient execution plans and result processing statements without iterative schema discovery protocols.

Inventive Principle:
Principle #10Preliminary action

4Loss of time

If the database system cannot push predicates inside the ON clause, then the query structure remains simple and easy to process, but filtering operations are performed after DSF execution increasing processing time

Engineering Contradiction:
Improveprocessing timeVSAvoidpredicate pushing mechanism
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The predicate push capability is dynamically configured through the function descriptor, allowing the query optimizer to adaptively rewrite queries by pushing predicates inside the ON clause when the DSF supports it. This dynamic optimization enables filtering before DSF execution, reducing the amount of data processed while maintaining query correctness through the descriptor's capability specifications.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11526505B2Enabling cross-platform query optimization via expressive markup language
Publication Date: 2022.12.13 TERADATA US INC
  • US11526505B2 patent drawing
  • US11526505B2 patent drawing
  • US11526505B2 patent drawing

AI summary

A database system receives a request from a user. The request invokes a data set function (DSF) and uses a property to be provided by the DSF. The database system determines that a function descriptor is available for the DSF. The function descriptor is expressed as markup language instructions. The function descriptor defines the property of the DSF. The database system uses the function descriptor to define a property for the DSF.