Query Engine Custom Index Application for Nested Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database systems face inefficiencies when processing queries with nested elements, as they often ignore custom indexes, leading to increased resource usage and processing time, especially in unified systems handling data for multiple clients.

Innovation Solution

A query engine identifies and applies custom indexes to nested queries, treating them as independent queries to enable optimization techniques such as index application, join operations, and filter usage, thereby maintaining context and improving performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If custom indexes are not applied to inner queries, then the database system maintains simplicity in query processing, but query processing time increases significantly

Engineering Contradiction:
Improvequery processing timeVSAvoidquery processing complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The query processing system is segmented into distinct components: a query parser that identifies inner queries, an index selection module that determines applicable custom indexes, and an execution engine that applies the indexes. This segmentation allows the system to apply optimization only where needed without overwhelming complexity throughout the entire query processing pipeline.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Custom indexes are pre-built and stored in the database system before query execution. When an inner query is detected, the system performs preliminary checks to identify applicable indexes and prepares the optimized execution plan in advance, rather than creating indexes on-the-fly during query processing. This reduces both processing time and complexity.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If all data is processed to answer queries, then complete accuracy is ensured, but resource usage increases significantly

Engineering Contradiction:
Improvequery processing efficiencyVSAvoidprocessing resource usage
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The system extracts and applies custom indexes to inner queries to retrieve only the necessary data subsets required to answer the query. By using indexes, the system extracts precisely the data needed without processing unrelated records, thereby reducing resource usage while maintaining complete accuracy for the query results.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Different processing strategies are applied to different parts of the query based on their characteristics. Inner queries that can benefit from custom indexes receive optimized index-based processing, while other parts of the query use traditional full-table scanning. This localized application of optimization techniques improves overall efficiency without wasting resources on areas where indexes provide no benefit.

Inventive Principle:
Principle #3Local quality

3Speed

If custom indexes are applied to inner queries, then query processing speed increases, but the system complexity increases

Engineering Contradiction:
Improvequery processing speedVSAvoidsystem complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The query optimization system performs self-service by automatically detecting inner queries, identifying applicable custom indexes, and generating optimized execution plans without requiring manual intervention. The system maintains metadata about custom indexes and automatically matches them to relevant inner queries, enabling speed improvement while keeping the interface simple for users.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10152511B2Techniques for optimization of inner queries
Publication Date: 2018.12.11 SALESFORCE INC
  • US10152511B2 patent drawing
  • US10152511B2 patent drawing
  • US10152511B2 patent drawing

AI summary

In an on demand database system, a query engine applies a custom index for inner queries. The query engine receives a query and determines that the query has an inner query nested within the primary query. The query engine identifies that a custom index exists for a client associated with the query, and applies the custom index to filter results for the query. The custom index includes a subset of information of a table that includes accounts for multiple different clients. By using the custom index, the query engine can filter the results more efficiently that if solely using the multiple client table.