KatInterview

BI Connection Strategy and Filter Execution Order

System DesignModel answer
HardModel answerSystem Designbusiness-intelligencedata-architectureperformance-optimization

Last updated

Choose connection modes, tune query performance, and understand filter precedence for dashboards over large datasets in business intelligence platforms.

You're building a business intelligence dashboard that queries a fact table with 100 million rows.

Part 1: Connection Architecture

Your BI platform offers two connection modes:

  • Direct connection: queries hit the database on every user interaction
  • In-memory cache: data is copied into the BI tool's engine and refreshed periodically

For the 100M-row scenario, compare these approaches across:

  • Data freshness and staleness tolerance
  • Query performance and predictability
  • Infrastructure cost and load patterns
  • Storage footprint in the BI tool
  • Refresh strategies (full replacement vs adding only new records)
  • Row-level security enforcement options

Provide a recommendation with reasoning.

Part 2: Filter Execution Precedence

The BI platform processes filters and calculations in a specific sequence. Explain how execution order affects dashboard results when you combine:

  • Filters applied at the data source level
  • Context-setting filters that create intermediate subsets
  • Standard dimension and measure filters
  • Top-N selections
  • Level-of-detail calculations (aggregations at fixed, broader, or narrower grain than the visualization)
  • Post-aggregation table calculations

Give concrete examples where filter order changes the output.

Part 3: Performance Optimization

Describe strategies to improve dashboard speed:

  • When to promote filters to earlier execution stages
  • How to reduce cache size and query scope
  • Trade-offs between denormalized tables vs normalized joins
  • How to identify whether bottlenecks are in query execution vs rendering

Part 4: Platform Migration

If migrating this dashboard to a different BI platform with similar but not identical architecture, what is one critical error to avoid?

Hints

Hint 1

Consider that earlier filter stages reduce data volume for all subsequent operations

Hint 2

Level-of-detail calculations computed at different stages interact differently with user-applied filters

Hint 3

Query pushdown to the database versus in-tool computation have fundamentally different cost and performance profiles