Clustering Cost Estimation Manager for Database Maintenance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Estimating clustering costs in databases is challenging due to the dependence on data distribution, characteristics, and Data Manipulation Language (DML) patterns, making it difficult to achieve accurate cost models without actual data layout assessment.

Innovation Solution

The proposed solution involves configuring a Clustering Cost Estimation Manager (CCEM) to perform one-time and maintenance cost estimations by modeling costs on sampled data, observing historical DML patterns, and calculating layout, sort costs, and write amplification.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If actual data layout assessment is performed to achieve accurate cost models, then measurement precision of clustering costs is improved, but device complexity and time consumption increase

Engineering Contradiction:
Improveclustering cost estimation accuracyVSAvoidcost model complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent creates a simplified copy of the actual data layout assessment process. Instead of performing complete data layout analysis, the system uses sampled data and historical DML patterns to generate approximate cost models that capture essential clustering cost characteristics without requiring full data assessment.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent employs temporary sampled data representations and historical pattern records as disposable artifacts. These sampled data copies and pattern logs provide sufficient information for cost estimation without requiring permanent, comprehensive data layout analysis, reducing overall system complexity.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

2Measurement precision

If comprehensive data layout assessment is performed, then clustering cost estimation accuracy is improved, but loss of time increases

Engineering Contradiction:
Improveclustering cost estimation accuracyVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary sampling of data and collection of historical DML patterns before actual cost estimation. By pre-processing and storing sampled data characteristics and DML patterns, the system can quickly generate cost models without repeating comprehensive data assessment for each estimation request.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copied historical DML patterns and sampled data representations to rapidly estimate clustering costs. Instead of performing time-consuming actual data layout analysis for each cost estimation, the system queries pre-computed samples and patterns that replicate the essential cost characteristics.

Inventive Principle:
Principle #26Copying

3Loss of time

If sampling and historical pattern observation are used instead of actual data layout assessment, then loss of time is reduced, but measurement precision of clustering costs deteriorates

Engineering Contradiction:
Improvetime consumptionVSAvoidclustering cost estimation accuracy
Core Design Contradiction:
Loss of timeVSMeasurement precision

Solution Approach 1:

The patent implements feedback mechanisms where historical DML patterns and sampled data characteristics are continuously refined and used to improve cost estimation accuracy. The system learns from actual clustering operations and adjusts its sampling and pattern observation methods to achieve better precision over time without increasing immediate time consumption.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent dynamically adjusts sampling parameters and historical pattern thresholds to optimize the balance between speed and accuracy. By changing sampling sizes, pattern observation windows, and cost model parameters based on data characteristics, the system maintains acceptable precision while minimizing time consumption.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250131017A1Machine time estimation for continuous maintenance of clustered data
Publication Date: 2025.04.24 SNOWFLAKE INC
  • US20250131017A1 patent drawing
  • US20250131017A1 patent drawing
  • US20250131017A1 patent drawing

AI summary

A method includes sampling, by at least one hardware processor, a table using a clustering key to obtain a set of batches. Each batch of the set of batches includes a set of partitions of the table. A clustering job is performed for at least one batch of the set of batches. A machine processing cost associated with the clustering job is determined on a per-row basis. A total clustering cost associated with clustering data in the table is determined based on the machine processing cost on the per-row basis.