Pruning Index for Geospatial Query Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Processing queries on very large tables, especially those with geospatial predicates, is challenging due to the time and resource intensity required to scan entire tables.

Innovation Solution

The creation of a search index, referred to as a pruning index, which organizes a large source table into micro-partitions and uses filters like blocked bloom filters to identify a reduced scan set for processing queries with geospatial predicates.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the entire table is scanned to process queries with geospatial predicates, then all data can be examined to ensure query accuracy, but the time and computing resources required increase significantly

Engineering Contradiction:
Improvequery accuracyVSAvoidquery execution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent divides the large table into multiple micro-partitions and creates pruning indexes for each micro-partition. This segmentation allows the query processor to evaluate predicates at the micro-partition level and eliminate entire micro-partitions that cannot satisfy the query conditions, rather than scanning every row in the table. The segmentation principle directly resolves the contradiction by maintaining query accuracy through systematic evaluation while dramatically reducing the time and resources needed compared to full table scans.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by pre-computing pruning indexes that store metadata about each micro-partition's data characteristics. Before executing a query, the system has already organized and indexed the data in a way that enables rapid predicate evaluation. This preliminary organization allows the system to quickly determine which micro-partitions can be skipped, resolving the contradiction by preparing the data structure in advance to enable fast, accurate query processing without full table scans.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the entire table is scanned to process queries with geospatial predicates, then complete data coverage is achieved, but the computing resources required increase significantly

Engineering Contradiction:
Improvedata coverageVSAvoidcomputing resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent segments the table into micro-partitions with associated pruning indexes, enabling resource-efficient query processing. By evaluating geospatial predicates at the micro-partition level using pre-computed index data, the system avoids the exponential resource consumption of full table scans while maintaining complete data coverage where needed. This segmentation allows selective processing that preserves data coverage reliability while dramatically reducing computing resource usage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies partial action by processing only the necessary micro-partitions that can potentially satisfy the query conditions, rather than performing excessive full table scans. The pruning index enables the system to identify and process only the relevant subset of data, achieving complete coverage of relevant data while avoiding wasteful processing of irrelevant micro-partitions, thus resolving the contradiction between data coverage and resource consumption.

Inventive Principle:
Principle #16Partial or excessive action

3Loss of time

If a pruning index is created to reduce scan sets for geospatial queries, then query execution time is reduced, but the device complexity increases due to index maintenance

Engineering Contradiction:
Improvequery execution timeVSAvoidindex maintenance complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent segments the indexing task into manageable micro-partition-level indexes rather than requiring a single complex global index. Each micro-partition has its own pruning index, which simplifies the maintenance burden compared to a monolithic index structure. This segmentation allows parallel index maintenance operations and reduces the complexity of index updates, resolving the contradiction by making the indexing system more manageable while still achieving fast query execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces pruning indexes as intermediary structures between the raw table data and the query processing logic. These indexes serve as a middle layer that pre-computes and stores metadata about micro-partitions, allowing the query processor to make rapid decisions about which micro-partitions to scan without directly analyzing the raw data. This intermediary structure reduces query execution time while keeping maintenance complexity manageable by isolating the complexity in the index layer rather than in the core query processing logic.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12314263B2Indexed geospatial search
Publication Date: 2025.05.27 SNOWFLAKE INC
  • US12314263B2 patent drawing
  • US12314263B2 patent drawing
  • US12314263B2 patent drawing

AI summary

A method to perform an indexed geospatial search includes retrieving, by at least one hardware processor, a query specifying a geography data column and a constant geography object. A first plurality of hash functions of a first set of cells covering a surface associated with the geography data column is determined. A search index of a database including the geography data column is updated based on the first plurality of hash functions to obtain an updated search index. The query is executed on a reduced scan set of the database. The reduced scan set is based on the updated search index.