← Back to Technical blog

Technical article

HENGSHI Heterogeneous Filtering: The Three-Layer Architecture Behind a 30x Cross-Source Query Benchmark

An explanation of HENGSHI's cross-source analytics approach through query-plan decomposition, conditional pushdown, and result reuse, with clear boundaries for interpreting benchmark results.

Sep 24, 2026Technical blogHENGSHI9 min read
HENGSHI BIHeterogeneous FilteringCross-Source QueryData Governance

Article body

Full article

Summary

Enterprise analytics frequently spans operational databases, data warehouses, and SaaS applications. The question is not simply whether those sources can be connected. It also includes the amount of data moved during cross-source association, metric consistency, latency, authorization boundaries, and source-system load. HENGSHI can address these problems by combining query-plan decomposition, filter pushdown where source capabilities permit it, and controlled result reuse or caching to reduce unnecessary transfer and repeated computation.

The “30x” in this article’s title must be understood only as a comparison from a defined benchmark scenario. It is not a performance promise for every source, SQL statement, concurrency profile, or production environment, and it is not a service-level commitment. Production outcomes depend on data volume, filter selectivity, source capability, network conditions, model design, cache state, and concurrent load. They should be verified against the customer’s own data and business definitions through validation or a proof of concept.

1. The Challenge of Cross-Source Analytics Is More Than Connection Count

In a typical analytics scenario, orders, customers, products, organizations, and budgets may reside in separate systems. Pulling complete detail from each source into one location before joining can increase network transfer and source-system pressure, while results can still be affected by refresh timing and the quality of key mappings.

The goal therefore should not be described as “joining all data in real time, losslessly, and without limits.” A more rigorous goal is to perform filtering and aggregation at the right location wherever the source, connection, and governance rules support it; move only what is needed for the analysis; and define boundaries for associations that cannot be handled safely or efficiently.

2. A Three-Layer View of Heterogeneous Filtering

1. Query-plan decomposition: identify what can finish at the source

Cross-source analytics first distinguishes filters, aggregations, and sorts that can be completed inside an individual source from steps that must be handled in a common analytical layer. Source-capable steps should use the source’s own compute; result sets that require cross-source association can then be combined later.

This is not the same as forwarding the original SQL unchanged to every source. A practical plan must account for connector capabilities, function semantics, data types, collation and ordering, authorization, and freshness. Sources differ in what they support, so the execution plan must differ too.

2. Source-side filtering and pushdown: only where semantics and capabilities hold

When the connection, query semantics, and source capabilities support it, highly selective filters, required projections, and selected aggregations can run as close to the source as possible. This reduces the volume entering the cross-source association stage. For example, an order source can first be constrained by time window and status before it is analyzed with customer or product dimensions.

More pushdown is not automatically better. Forcing an expression down when database semantics differ or when a source does not support the operation can create incorrect results or failures. Correctness comes first; query plans, result sampling, and load tests should be used to validate any gain.

3. Result reuse and caching: make reuse controlled rather than implicit

Intermediate results used repeatedly in the same analysis period can be reused when freshness and authorization isolation requirements are met. A cache policy needs explicit invalidation conditions, refresh cadence, visibility scope, and resource limits. Cache must not be treated as a substitute for permanently current data.

For operating dashboards and periodic reporting, caching can reduce repeat computation. For reconciliation, audit, or high-timeliness decisions, refresh rules should determine whether cache is bypassed or its lifetime is shortened.

3. How to Interpret a “30x Faster” Result Correctly

A performance comparison needs a test boundary. If a benchmark compares an unoptimized cross-source execution path against a path that uses plan decomposition, pushdown, and result reuse, a large difference only shows that the latter better fits that defined workload. It cannot be generalized as a fixed outcome for every project.

A reproducible performance conclusion should record at least:

  • source types, versions, indexes, and connection methods;
  • data volumes, field cardinality, filters, and join keys;
  • network path, concurrency, cold or warm cache state, and timeout settings;
  • use of pre-aggregation, materialized results, or preprocessed data; and
  • the method for correctness validation and the impact on source-system load.

External materials should use language such as “showed a significant improvement in a defined benchmark scenario.” Specific figures belong in reproducible test reports, not as a universal product claim.

4. Choose an Approach After Classifying the Problem

ScenarioApproach worth evaluating firstItems that need verification
Small dimensions associated with business factsSource filtering, field pruning, and on-demand associationKey mapping, dimension updates, authorization scope
Combining aggregated results from multiple sourcesAggregate independently, then combine results in the analytical layerMetric definition, time grain, duplicate counting
High-cardinality association between two very large fact tablesPreprocessing, data integration, or warehouse modelingResource consumption, latency, cost, maintainability
Financial reconciliation or audit analyticsPrioritize traceability and reproducibilityDetail retention, definition versioning, refresh and approval rules

No query technology solves every multi-source heterogeneous association problem. For high-cardinality fact-to-fact joins, complex non-equi joins, or strict reconciliation, upfront data integration, warehouse modeling, or project-level assessment is often more reliable than forcing a query-time association.

5. Prerequisites for Implementation

  1. Unify business keys and metric definitions. Confirm mappings for customers, organizations, products, and time, and define each metric’s calculation boundary.
  2. Verify sources and connection capabilities. Use the actual version, driver, network, and account permissions as evidence rather than relying on conceptual descriptions.
  3. Establish authorization and audit rules. Cross-source access should follow organizational authorization rules so that aggregation does not broaden visibility.
  4. Validate performance with correctness first. Compare result sets before and after optimization while observing source load, stability, and resource use.
  5. State data freshness. Document the refresh cadence and applicable scenarios for cached, extracted, or pre-aggregated results so that analytical delay is not mistaken for real-time data.

Frequently Asked Questions

Is heterogeneous filtering the same as federated query?

It should not be treated as a simple synonym. It describes an optimization approach involving plan decomposition, source-side filtering, result combination, and reuse. The specific implementation must be assessed against the product version, connectors, and source capabilities.

Can every SQL operation be pushed down?

No. Function semantics, data types, source characteristics, and authorization restrictions may prevent or discourage pushdown. The query plan and result validation are the relevant evidence.

Will every project achieve 30x?

No. The figure is an example from a defined test condition, not a universal promise. Each project should validate against its own data, load, and acceptance criteria.

Conclusion

The value of HENGSHI heterogeneous analytics is to help teams handle governed, connectable, and verifiable multi-source data in a more controlled way. Keeping performance conclusions inside clear test boundaries—and grounding query optimization in correctness, authorization, and data governance—is what makes cross-source analytics useful for business decisions.

HENGSHI SENSE

Resources, ecosystem, and implementation stories

Explore how teams design and ship analytics with HENGSHI.

Request a trial

Enterprise deployment, embedded delivery, and trial requests can all be handled quickly.