This post is the second part of a two-part series on optimizing Databricks AI/BI dashboard performance at scale.
In the previous post, we focused how layout, filters, parameters, and caching determine how much work the system does for every click. Those optimizations are often enough to make dashboards feel fast.
In this post, we shift the focus to the platform foundations that keep them fast as usage grows. We’ll look at warehouse selection and sizing, data modeling and schema choices, file layout and clustering, and when to rely on materialization instead of recomputation to achieve stable, predictable performance.
Match your dashboard shape (pages, query mix, user burstiness) to the DBSQL warehouse type and sizing so the system admits work quickly without queueing.
Because visible widgets submit together, dashboards naturally generate short-lived concurrency spikes. If the warehouse can’t absorb the burst, you’ll see queueing (Peak Queued Queries > 0) and inconsistent tile load times—especially at peak hours.
For more details, see: https://docs.databricks.com/aws/en/compute/sql-warehouse/warehouse-behavior
Well-designed data models are a foundational performance feature for AI/BI dashboards. The star schema remains the most effective and predictable modeling pattern for interactive analytics because it aligns directly with how BI queries are written and optimized.
In a star schema, a central fact table contains measurable events (sales, transactions, clicks) and joins to surrounding dimension tables (date, customer, product, region). This structure minimizes join complexity, reduces data duplication, and enables efficient aggregations with simple, stable query patterns. As a result, dashboards execute fewer joins, scan less data, and benefit more consistently from caching and query optimization.
A critical but often overlooked detail is join key data types. Dimension and fact table joins should use integer-based surrogate keys, not strings. Integer joins are significantly faster, require less memory, improve cache efficiency, and allow Photon to execute joins using highly optimized vectorized paths. String-based joins increase CPU cost and can become a hidden bottleneck as data and concurrency grow.
In Databricks, this pattern fits naturally with the Lakehouse architecture. The gold layer should be modeled as facts and dimensions stored as Unity Catalog tables, providing a governed, reusable semantic foundation for AI/BI dashboards, metric views, and materialized views.
The takeaway is simple: model for how BI queries actually run. A star schema with integer join keys in the gold layer delivers simpler SQL, faster joins, and more predictable performance at scale.
Design your data layout so dashboards read far less data per query, then let the engine exploit Parquet stats and selective reads.
Databricks SQL is fastest when it can:
So the two biggest wins are: compact files into optimal sizes, and
cluster data so predicates prune files.
More details are available here: https://www.databricks.com/discover/pages/optimize-data-workloads-guide
A classic anti-pattern: a dashboard filter like WHERE customer_id = ? looks selective, but if the data isn’t clustered, the engine still touches a huge portion of files because the matching rows are scattered everywhere.
Result: fewer files touched, more blocks skipped, and shorter wall‑clock for the same insights, without brittle indexes or manual tuning.
For more details, see:
In Optimization #7: Apply data modeling best practices, we focused on the importance of the star schema with clearly defined facts, dimensions, and KPIs. Metric Views are a direct continuation of these principles in Databricks AI/BI.
Metric Views are designed around BI semantics: they consist of measures and dimensions, making them a natural abstraction for modeling KPIs. They allow teams to define business metrics once and reuse the same KPIs consistently across multiple dashboards, agents, and other client tools. This reduces duplication, prevents KPI drift, and keeps analytical logic aligned as adoption grows.
With Materilization for Metric Views, Databricks automatically precomputes and maintains frequently used aggregates. These aggregates are updated incrementally, and at query time the optimizer transparently rewrites dashboard queries to the best matching precomputed result. As a result, dashboards queries scan far less data per interaction - without requiring teams to manage separate aggregation tables or custom pipelines.
If Metric Views are not used, the same approach can be applied with Materialized Views. For example, an aggregated version of a large fact table can be precomputed and stored, allowing dashboards to query a much smaller, optimized dataset. This significantly improves performance by reducing the amount of data scanned and avoids repeatedly recomputing expensive aggregations for each user interaction.
All of these techniques optimize the same thing: scanning less data. By defining KPIs once and precomputing frequently used aggregates with Metric Views or Materialized Views, dashboards avoid repeatedly aggregating large fact tables. Fewer scanned bytes translate directly into faster queries, more predictable latency, and better performance at scale.
For more details, see:
Data types directly influence how much data Databricks SQL has to read, move, and process for every dashboard query. Even with perfect SQL and caching, inefficient data types quietly increase IO, memory pressure, and CPU cost—showing up as slower tiles and reduced concurrency.
Under the hood, Databricks SQL operates on columnar Parquet files. Smaller, well-chosen data types mean:
A few mechanics matter most:
In BI workloads, these choices compound quickly: a dashboard page may execute dozens of queries, each scanning millions of rows. Narrow, well-typed columns reduce scan time, improve cache hit rates, and allow Photon to operate at peak efficiency.
Rule of thumb: treat schema design as a performance feature. Optimize data types once in the Lakehouse, and every dashboard—current and future—benefits automatically.
The theme across all ten best practices is simple: stop paying the full price of a dashboard interaction every time. Make the system do less work per view (less fan-out, less data scanned), and make the work it does reusable (shared datasets, deterministic queries, caches, and precomputed aggregates). When those pieces line up, performance becomes stable under concurrency—and cost becomes predictable.
Actionably, you should be able to answer “yes” to these questions for your most-used dashboards:
Pick one dashboard with real adoption, run a quick baseline (first paint, interaction latency, Peak Queued Queries, spill, cache hit rate), apply a couple of the highest-leverage changes, and re-measure. Do that consistently, and you’ll move from “sometimes fast” to reliably fast AI/BI as data and users grow.
