The present application relates to the technical field of
data warehouse index calculation, and proposes an index calculation method and device based on a hierarchical
index system, comprising: acquiring
external data sources collected to an ODS layer, connecting fact tables and dimension tables into wide tables and saving to a DWD layer; based on the DWD layer, constructing atomic indexes, derivative indexes and composite indexes, integrating to form index aggregation; performing index aggregation through a
data acquisition task, loading the calculation result to a target table, constructing an index API to return a query result; estimating the performance quantitative value of the index aggregation, when exceeding an optimization
decision threshold, tracing back to the upstream to obtain dependent indexes of each level; based on the dependent indexes, constructing corresponding materialized views, and using
database transparent
rewriting technology to redirect the query request to the
materialized view. The present application improves the execution efficiency and
system response performance of index calculation, and realizes intelligent, automatic and high-performance calculation
processing of a large-scale
index system.