Database Statement Execution Optimization for Encrypted Data

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database optimization techniques are ineffective when dealing with encrypted columns, as they cannot accurately estimate the cost of processing database statements due to limited database operations that can be performed on encrypted data, restricting the gathering of sufficient statistics.

Innovation Solution

A trusted machine in a protected computing environment is used to decrypt encrypted data and generate statistics for encrypted columns, enabling the statement optimizer to more accurately estimate the cost of executing database statements by offloading processing to the trusted machine.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If encrypted data is used in database columns, then data security is improved, but the ability to perform database operations and gather statistics is restricted

Engineering Contradiction:
Improvedata securityVSAvoiddatabase operations capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent introduces an intermediary component (trusted machine or decryption module) that temporarily decrypts encrypted column values to enable the statement optimizer to access and analyze the data for cost estimation. This intermediary allows the system to maintain security (data remains encrypted in storage) while restoring operational capability (optimizer can read and analyze data during query planning). The intermediary bridges the gap between security requirements and optimization needs.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If encrypted data is used in database columns, then data security is improved, but the accuracy of cost estimation for execution plans deteriorates

Engineering Contradiction:
Improvedata securityVSAvoidcost estimation accuracy
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent applies preliminary action by having the trusted machine decrypt encrypted column values in advance of query execution, during the query planning phase. This allows the statement optimizer to access the actual data values and perform accurate cost estimation before the query is executed. The decryption happens preliminarily during plan generation, not during actual query execution, ensuring both security and accuracy.

Inventive Principle:
Principle #10Preliminary action

3Speed

If traditional optimization techniques are used on encrypted data, then processing speed is maintained, but the quality of execution plan selection deteriorates

Engineering Contradiction:
Improveprocessing speedVSAvoidexecution plan quality
Core Design Contradiction:
SpeedVSManufacturing precision

Solution Approach 1:

The patent segments the database system into two distinct components: an untrusted machine that handles query execution and an encrypted column store that maintains secure data. This segmentation allows the optimization process to occur in a controlled environment where decryption is managed separately from the main query processing flow. The statement optimizer can access decrypted values for planning purposes while the actual execution maintains security, thus improving plan quality without significantly impacting processing speed.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10515077B2Execution optimization of database statements involving encrypted data
Publication Date: 2019.12.24 MICROSOFT TECHNOLOGY LICENSING LLC
  • US10515077B2 patent drawing
  • US10515077B2 patent drawing
  • US10515077B2 patent drawing

AI summary

Computer systems, devices, and associated methods of optimizing the execution of instructions of a database statement by a database server are disclosed herein. In one embodiment, a method includes identifying a potential execution plan for executing instructions of the database statement and estimating a cost for executing the execution plan. The cost can comprise an encrypted data processing cost associated with a operation in the execution plan of executing an operation on encrypted data in a protected computing environment. The method can include estimating the encrypted data processing cost in the protected computing environment based on statistics generated in the protected computing environment about a database table. In response to estimating the cost for executing the execution plan, comparing the cost to estimated costs of alternative execution plans, selecting the lowest-cost plan for execution, and executing the lowest-cost execution plan.