Database Transaction Speculative Execution for Throughput

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional database transaction execution methods are inefficient due to the inability to determine segmentation conditions or jump logic in advance, leading to low transaction throughput and increased resource consumption.

Innovation Solution

A database operating method and apparatus that speculatively executes transactions based on encapsulated service logic code to determine segmentation conditions and data ranges, allowing for pre-preparation of data and efficient execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If transactions are executed sequentially according to execution logic, then transaction correctness is ensured, but transaction throughput is low and execution efficiency is poor

Engineering Contradiction:
Improvetransaction throughputVSAvoidtransaction execution time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by analyzing and determining the execution path of transactions before actual execution. The system performs static analysis to identify segmentation conditions and jump logic in advance, creating an execution plan that guides the transaction processing. This allows the database to prepare and optimize resource allocation beforehand, avoiding runtime decision-making delays and enabling parallel execution of independent transaction operations, thereby significantly improving throughput and reducing execution time.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If segmentation conditions and jump logic are determined during transaction execution, then transaction correctness is maintained, but execution efficiency is reduced due to runtime decision-making

Engineering Contradiction:
Improvetransaction execution efficiencyVSAvoidexecution control complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent determines segmentation conditions and jump logic through static analysis before transaction execution. By analyzing the transaction code structure, conditional statements, and data access patterns in advance, the system builds an execution plan that identifies which statements will be executed and in what order. This eliminates runtime decision-making complexity while maintaining execution correctness, as the execution engine simply follows the pre-determined path without needing to evaluate conditions during actual transaction processing.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If all transactions are executed with full concurrency control protocols, then transaction reliability is ensured, but system performance and throughput are reduced

Engineering Contradiction:
Improvetransaction reliabilityVSAvoidtransaction throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies local quality by implementing differentiated concurrency control based on transaction characteristics. The system analyzes each transaction to determine its isolation requirements, data access patterns, and conflict potential. For transactions with low conflict potential or those that can be executed independently according to the pre-determined execution plan, the system relaxes concurrency control requirements, allowing optimistic concurrency or reduced locking. For transactions requiring strict isolation, full concurrency control protocols are applied. This localized approach maintains reliability for critical transactions while improving overall throughput by reducing unnecessary control overhead.

Inventive Principle:
Principle #3Local quality

Data Source

PatentEP3396542B1Database operating method and device
Publication Date: 2023.09.13 ALIBABA GROUP HOLDING LTD
  • EP3396542B1 patent drawingFigure 1
  • EP3396542B1 patent drawingFigure 2
  • EP3396542B1 patent drawingFigure 3

AI summary

Disclosed are a database operating method and apparatus. The method includes: executing a trigger instruction of a target transaction according to a user instruction, and acquiring a service logic code into which the target transaction is encapsulated (301); conducting a speculative execution of the target transaction according to the service logic code, and recording a segmentation condition and an involved data range of the target transaction that are obtained in the process of the speculative execution (302); and controlling a database to which the segmentation condition is directed to actually execute the target transaction according to the service logic code as well as the segmentation condition and the involved data range of the target transaction that are obtained in the process of the speculative execution, when the speculative execution succeeds (303). The method improves the transaction execution efficiency and increases the transaction throughput.