Query Optimization Logic Preserving Hints on VPD Protected Columns

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database systems face inefficiencies when enforcing access control policies, as they lose track of optimization hints, leading to full table scans instead of using existing indexes on protected columns, resulting in significant performance issues.

Innovation Solution

Implementing query optimization logic that creates a new query with a predicate that conjunctively joins a clone of the original expression with a conditional expression derived from the access control policy, preserving optimization hints and allowing the use of existing indexes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a conditional expression is substituted for a protected column to enforce access control policy, then security is improved, but query performance deteriorates due to loss of optimization hints

Engineering Contradiction:
Improveaccess control policy enforcementVSAvoidquery execution efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent creates a clone of the original query expression that preserves the column reference needed for optimization hints, while separately enforcing the access control policy through conditional logic. This copying approach allows the system to maintain both security enforcement and query optimization capability.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent segments the query processing into distinct components: one part handles the access control policy enforcement through conditional expressions, while another part preserves the original expression structure for optimization hint preservation. This segmentation allows independent optimization of each function.

Inventive Principle:
Principle #1Segmentation

2Reliability

If the original query is modified to enforce access control, then security is improved, but the database system loses track of optimization hints leading to full table scans

Engineering Contradiction:
Improverow-level security enforcementVSAvoidquery execution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent creates a clone of the original query expression that preserves the column reference needed for optimization hints, while separately enforcing the access control policy through conditional logic. This copying approach allows the system to maintain both security enforcement and query optimization capability.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces an intermediary clone expression that acts as a bridge between the original query and the access control enforcement mechanism. This intermediary preserves the optimization hints while allowing the conditional expression to enforce security policies.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of manufacture

If an index exists on a protected column, then query optimization is possible, but substituting the column with a conditional expression prevents index utilization

Engineering Contradiction:
Improveindex creation on protected columnsVSAvoidquery plan selection
Core Design Contradiction:
Ease of manufactureVSEase of operation

Solution Approach 1:

The patent creates a clone of the original query expression that preserves the column reference needed for optimization hints, while separately enforcing the access control policy through conditional logic. This copying approach allows the system to maintain both security enforcement and query optimization capability.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS9886481B2Query optimization on VPD protected columns
Publication Date: 2018.02.06 ORACLE INT CORP
  • US9886481B2 patent drawing
  • US9886481B2 patent drawing
  • US9886481B2 patent drawing

AI summary

A method and apparatus for preserving optimization hints in a transformed query is provided. In one embodiment, the methodology is implemented by query optimization logic. Upon receiving a first query to access values in a column of a table protected by an access control policy, the query optimization logic creates a second query that is equivalent to the first query as subject to the access control policy. Furthermore, the second query contains a new predicate that conjunctively joins a clone of a first expression in a predicate of the first query with a second expression that is derived, based on the access control policy, from the first expression. In one embodiment, the query optimization logic submits the second query for execution.