Client-Side Query Routing for Partitioned Database Nodes

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed database systems, existing query execution mechanisms often lead to inefficiencies in routing queries across multiple nodes, particularly in determining the appropriate node for data retrieval, which can result in suboptimal performance and increased latency.

Innovation Solution

The system employs a query compilation and partitioning metadata approach, where database nodes determine the appropriate node for query execution based on partitioning metadata, allowing clients to route subsequent queries efficiently by storing compiled code and node identifiers, thereby optimizing query execution across the distributed database.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the system uses existing query execution mechanisms in distributed database systems, then the system can execute queries across multiple nodes, but it results in inefficiencies in routing queries and increased latency

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidquery latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs query compilation and determines the target database node in advance, storing the compiled query code and node identifier in a query cache. When the same query is executed again, the pre-complied information is retrieved from cache, eliminating the need for repeated compilation and node determination, thus reducing latency and improving execution efficiency

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates and stores copies of compiled query code and node identifier information in the query cache. These copies allow subsequent queries to be routed efficiently without re-compiling or re-determining the target node, reducing processing time and improving productivity

Inventive Principle:
Principle #26Copying

2Reliability

If the system determines the appropriate node for each query execution, then accurate data retrieval is ensured, but repeated compilation and node determination increase processing overhead

Engineering Contradiction:
Improvedata retrieval accuracyVSAvoidprocessing overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system determines the target database node and compiles the query in advance, storing this information in the query cache. This preliminary action ensures that when queries are executed, the routing decisions have already been made accurately, reducing processing overhead while maintaining reliability

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system stores copies of the compiled query and node identifier in the query cache. These copies preserve the accurate routing information determined previously, allowing multiple queries to benefit from the same reliable node determination without repeating the complex decision-making process

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8700660B2Client-side statement routing for partitioned tables
Publication Date: 2014.04.15 SAP SE
  • US8700660B2 patent drawing
  • US8700660B2 patent drawing
  • US8700660B2 patent drawing

AI summary

A system includes reception of a first query from a client device at a first database node of a database instance comprising two or more database nodes, the first query specifying a first database table which is partitioned among two or more of the two or more database nodes, determination of first partitioning metadata of the first database table, the first partitioning metadata usable to identify one of the two or more database nodes based on table key values, compilation of the first query at the first database node to generate first compiled code, and transmission of the first compiled code and the first partitioning metadata from the first database node to the client device.