SQL-Controlled Database Transactions for Hierarchical Speculation
Find Innovative SolutionsGenerate 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
Engineering 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
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.
2Productivity
If speculation read and speculation neglect are enabled, then concurrency degree of multi-transaction is improved, but transaction isolation control deteriorates
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.
3Ease of operation
If hierarchical control at system, session, transaction and_statement levels is implemented, then user experience is improved, but system complexity increases
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.
Data Source
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.


