Tenant-Selective Query Optimization in Multi-Tenant Databases

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional query optimizers in multi-tenant database systems are inefficient as they fail to account for the unique data characteristics of each tenant, leading to suboptimal query performance due to assumptions based on aggregate statistics that do not reflect individual tenant data distributions.

Innovation Solution

The implementation of tenant-selective query optimization methods that analyze tenant-specific metadata to generate improved queries by identifying optimal index intersections and adjusting query syntax, thereby customizing query paths based on tenant-level statistics and data distribution patterns.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If conventional query optimizers use aggregate statistics for query optimization, then the system can maintain simplicity and ease of operation, but query performance deteriorates due to inability to account for individual tenant data distributions

Engineering Contradiction:
Improvequery optimizer operationVSAvoidquery performance
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments the query optimization process by creating separate index structures for each tenant (tenant-specific indexes) rather than using a single aggregate index. This allows the system to maintain simple optimizer operations while achieving tenant-specific query performance optimization through customized index structures that reflect individual tenant data distributions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by tailoring index structures to each specific tenant's data characteristics. Each tenant receives customized index structures that reflect their unique data distribution patterns, allowing the query optimizer to achieve high performance for each tenant's specific queries without compromising operational simplicity.

Inventive Principle:
Principle #3Local quality

2Productivity

If the system creates separate index structures for each tenant, then query performance improves through tenant-specific optimization, but device complexity increases due to multiple index structures

Engineering Contradiction:
Improvequery performanceVSAvoidindex structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies universality by creating a unified index management framework that handles multiple tenant-specific indexes through a common interface and process. The system maintains multiple indexes but manages them through universal operations, reducing the perceived complexity while preserving the performance benefits of tenant-specific optimization.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent merges the management of multiple tenant-specific indexes into a unified index structure that can be processed together. By combining index maintenance operations and using shared metadata structures, the system reduces overall complexity while maintaining the ability to perform tenant-specific query optimization.

Inventive Principle:
Principle #5Merging (Combining)

3Ease of manufacture

If conventional optimizers assume uniform data distribution, then the system maintains ease of manufacture and deployment, but manufacturing precision deteriorates due to inaccurate query path selection

Engineering Contradiction:
Improvesystem deploymentVSAvoidquery path selection accuracy
Core Design Contradiction:
Ease of manufactureVSManufacturing precision

Solution Approach 1:

The patent changes the fundamental parameter of data distribution assumptions from uniform (conventional) to tenant-specific non-uniform distributions. By collecting and utilizing actual data distribution statistics for each tenant, the system achieves accurate query path selection that reflects real-world data patterns while maintaining straightforward deployment through automated index creation processes.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10956418B2Methods and systems for joining indexes for query optimization in a multi-tenant database
Publication Date: 2021.03.23 SALESFORCE INC
  • US10956418B2 patent drawing
  • US10956418B2 patent drawing
  • US10956418B2 patent drawing

AI summary

Methods and systems for query optimization for a multi-tenant database system are provided. Some embodiments comprise receiving at a network interface of a server in a multi-tenant database system an original query transmitted to the multi-tenant database system by a user associated with a tenant, wherein the original query is associated with data accessible by the tenant, and wherein the multi-tenant database system includes at least a first index and a second index. Metadata associated with the data is retrieved, wherein at least a portion of the data is stored in a common table within the multi-tenant database system. A tenant-selective query syntax is determined by analyzing at least one of metadata generated from information about the tenant or metadata generated from the data accessible by the tenant. An improved query is then generated using the query syntax, wherein the improved query is based at least in part upon the original query and a result of a join between a first number of rows associated with the first index and a second number of rows associated with the second index.