Hierarchical Database Counting Measure for Distinct Query Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional distinct count functions in hierarchical databases, such as OLAP databases, are processor-intensive and require significant processing time due to the need for multiple queries to calculate distinct counts, which can be inefficient for reasonably sized datasets.

Innovation Solution

A pre-defined counting measure is introduced in the hierarchical database, allowing for the calculation of distinct counts through a single query by defining the measure within the database and associating it with specific data categories, thereby reducing the number of queries required to retrieve distinct count values.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional distinct count function is used in MDX, then accurate distinct count values can be obtained, but processing time and computational resources increase significantly

Engineering Contradiction:
Improvedistinct count accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent pre-calculates distinct count values during data cube construction and stores them in a specialized data structure. When a query is executed, the system retrieves pre-computed distinct count values rather than calculating them at query time, eliminating the need for multiple separate queries and significantly reducing processing time while maintaining accuracy.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If traditional distinct count function is used in MDX, then accurate distinct count values can be obtained, but the number of queries and system complexity increase

Engineering Contradiction:
Improvedistinct count accuracyVSAvoidquery execution complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent merges the distinct count calculation functionality into the standard aggregate function execution. By integrating distinct count computation with existing aggregation operations and using a unified data structure, the system eliminates the need for separate query execution paths and reduces overall system complexity while maintaining measurement precision.

Inventive Principle:
Principle #5Merging (Combining)

3Productivity

If pre-defined counting measure is implemented, then query processing time is reduced, but database structure complexity increases

Engineering Contradiction:
Improvequery processing efficiencyVSAvoiddatabase structure
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements a nested data structure where distinct count information is embedded within the existing OLAP cube structure. The counting measure tree is nested within the cube's memory structure, allowing the system to store and retrieve distinct count values efficiently without requiring separate database structures or tables, thus minimizing the increase in overall database complexity.

Inventive Principle:
Principle #7Nested doll (Nesting)

Data Source

PatentUS7698314B2Computer-implemented systems and methods for providing a counting measure
Publication Date: 2010.04.13 SAS INSTITUTE INC
  • US7698314B2 patent drawing
  • US7698314B2 patent drawing
  • US7698314B2 patent drawing

AI summary

In accordance with the teachings described herein, systems and methods are provided for calculating a distinct count value from data stored in a hierarchical database. A counting measure may be defined in the hierarchical database such that the counting measure is associated with members of a first category of data to be stored in the hierarchical database. A query may be received that identifies the counting measure. The hierarchical database may be queried to identify members of the first category of data that are presently in the hierarchical database. A data structure may be generated that includes the members of the first category of data that are stored in the hierarchical database. One or more distinct count values may be calculated for the members of the first category of data that are stored in the hierarchical database.