SQL-Controlled Database Transactions for Hierarchical Speculation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database systems support speculation transactions only at the system level, limiting user control over speculation functions like speculation read and speculation neglect, which affects user experience and ecosystem compatibility.

Innovation Solution

Implementing a method and apparatus that allow user equipment to control speculation functions through Structured Query Language (SQL) statements, enabling hierarchical control of speculation read, speculation neglect, and speculation write at system, session, transaction, and statement levels.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If speculation transaction is supported only at system layer, then database system performance is improved through multi-version concurrency control, but user control capability deteriorates

Engineering Contradiction:
Improvedatabase system performanceVSAvoiduser control capability
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The patent segments the speculation transaction control into multiple hierarchical levels: system level, session level, transaction level, and statement level. This segmentation allows users to control speculation functions at different granularities, improving ease of operation while maintaining system performance through selective application of speculation mechanisms where needed.

Inventive Principle:
Principle #1Segmentation

2Productivity

If speculation read and speculation neglect are enabled, then concurrency degree of multi-transaction is improved, but transaction isolation control deteriorates

Engineering Contradiction:
Improveconcurrency degreeVSAvoidtransaction isolation control
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements dynamic control of speculation functions through the hierarchical framework, allowing the system to adaptively enable or disable speculation read and speculation neglect based on transaction requirements, isolation level settings, and user preferences. This dynamic approach maintains high concurrency when speculation is appropriate while ensuring proper isolation control when required.

Inventive Principle:
Principle #15Dynamics

3Ease of operation

If hierarchical control at system, session, transaction and_statement levels is implemented, then user experience is improved, but system complexity increases

Engineering Contradiction:
Improveuser experienceVSAvoidsystem complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent applies local quality by allowing different speculation control policies at different hierarchical levels and for different transactions. Each level (system, session, transaction, statement) can have customized speculation settings tailored to specific needs, improving user experience through precise control while managing complexity through localized rather than universal control mechanisms.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12411839B2Method and apparatus for controlling database transaction, and related device
Publication Date: 2025.09.09 HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
  • US12411839B2 patent drawing
  • US12411839B2 patent drawing
  • US12411839B2 patent drawing

AI summary

A method for controlling a database transaction, includes: receiving a structured query language (SQL) statement from a user equipment; setting a first speculation function of a first database transaction based on the SQL statement, where the first speculation function indicates that before a log of a second database transaction is committed, an operation record of the second database transaction is visible to the first database transaction; and performing an operation on the first database transaction based on the first speculation function.