Query Transformer for Multi-Tenant Database Index Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional database systems face inefficiencies in query optimization due to the lack of awareness about shared database indexes, leading to suboptimal data path selection in multi-tenant environments.

Innovation Solution

The method involves transforming query requests by preprocessing query predicates with formulas, reversing functions, and replacing database fields with direct references to underlying fields, which allows the query optimizer to identify and utilize indexes that may have been missed otherwise, thereby optimizing data retrieval paths.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the query optimizer relies on conventional index selection methods, then the system structure remains simple, but data retrieval efficiency deteriorates due to suboptimal data path selection in multi-tenant environments

Engineering Contradiction:
Improvedata retrieval efficiencyVSAvoidquery optimization complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by pre-processing formulas in query predicates before optimization. The query transformer analyzes and transforms formulas that reference database fields into optimized forms, preparing the query for more effective index selection. This preliminary transformation enables the query optimizer to identify applicable indexes that would otherwise be missed, improving data retrieval efficiency without requiring complex real-time analysis during optimization.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A query transformer is introduced as an intermediary component between the query parser and the query optimizer. This transformer specifically handles formula processing in query predicates, converting them into forms that the optimizer can effectively process. The intermediary layer bridges the gap between raw query formulas and optimization requirements, enabling efficient index selection without burdening the core optimization algorithm with complex formula analysis.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If the query optimizer is made aware of shared database indexes through formula preprocessing, then data path selection improves, but query processing time increases due to additional transformation steps

Engineering Contradiction:
Improvedata path selection accuracyVSAvoidquery processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

Formula preprocessing is performed as a preliminary action during query parsing, before the optimization phase begins. By completing the transformation work upfront, the actual optimization process can focus solely on index selection without re-analyzing formulas, thereby minimizing the time penalty of the additional transformation step.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The query transformer operates autonomously during the parsing phase, automatically identifying and transforming formulas without requiring manual intervention or complex coordination with the optimizer. The system serves itself by integrating the transformation capability directly into the parsing process, eliminating the need for separate heavy transformation passes during optimization.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10262027B2Transforming queries in a multi-tenant database system
Publication Date: 2019.04.16 SALESFORCE INC
  • US10262027B2 patent drawing
  • US10262027B2 patent drawing
  • US10262027B2 patent drawing

AI summary

In a method, system, and computer-readable medium having instructions for executing a query in a database system, a query request is received with a query predicate to filter data returned in response to the query request and the query predicate has a formula, the query request is transformed to a transformed query request by preprocessing the formula in the query predicate, and the query request is optimized using the transformed query request.