Cloud & Automation

Pre-Rendered Reports vs Live Queries

Choose pre-rendered, live, or hybrid report execution using freshness, repetition, variability, cost and security constraints.

By JaviPublished Updated 7 min readIntermediate

Report request following cache-hit or live-query paths

Short answer: pre-render a report when the same result is requested repeatedly and the data changes on a known schedule; run it live when the filters vary too much to reuse results or users need data newer than the last load. Most report engines end up hybrid: serve a stored result while it matches the current data version, query live on a miss. Decide per report class, not once for the whole engine.

Pre-rendered

Pre-rendered results fit repeated known reports, expensive historical queries, and predictable date ranges. They move work away from request time and provide stable latency, but require storage, freshness metadata, invalidation, secure tenant separation, and lifecycle cleanup. A pre-rendered file must still be authorized at download.

Live query

Live execution fits fresh data, highly variable filters, low-latency query engines, and interactive exploration. It avoids stale artifacts but exposes the data platform to concurrency and unpredictable request cost. Apply validated templates, timeouts, cancellation, row limits, quotas, and load shedding.

Hybrid

  1. RequestValidated, tenant resolved
  2. Cache keytenantreportparametersformatversion
  3. Look upIn report-cache, under{tenant}/{report}/…
  4. Cached and fresh?Within the report’s TTL

Yes Cache hit

  1. Authorize again for this caller
  2. Read the stored output
  3. Return result

No Cache miss

  1. Query Fabric (approved template)
  2. Build output: JSON, CSV or Parquet
  3. Store under the tenant’s path, with a TTL
  4. Return result

Tenant-aware: same report, same parameters, different tenants

  • contosocontoso · sales-by-region · 2026-09 · csv · v3report-cache/contoso/sales-by-region/…
  • fabrikamfabrikam · sales-by-region · 2026-09 · csv · v3report-cache/fabrikam/sales-by-region/…

Two keys, two folders: never shared.

A hybrid design in one picture: requests are served from stored outputs while they are fresh and fall back to a live Fabric query on a miss. The tenant always leads the cache key and the storage path.

A hybrid engine checks a tenant-aware cache first and executes a fresh query on a safe miss. Cache keys include tenant, report type, date range, dimensions, filters, format, and report version. TTL follows freshness requirements. Invalidation can be event-driven after a data refresh or time-based when exact coupling is impractical.

Decision

There is no universal winner. Choose per report class using freshness objective, repetition, parameter variability, execution cost, result size, concurrency, and failure tolerance. Measure cache hit rate and query duration, but also correctness, stale-result incidents, output security, and storage growth.

Deciding per report class

Report class Example Typical choice Reason
Fixed period, fixed parameters, many readers Monthly statement per tenant Pre-render after the monthly load Same output read many times; data will not change
Common parameters, daily data “Last 30 days by channel” Hybrid, keyed by data version High reuse until the next load, then naturally invalid
Free combinations of filters and dimensions Ad-hoc breakdowns from an API Live, with strict limits Reuse is rare, so stored results mostly waste storage
Near-real-time operational view Orders in the last 15 minutes Live, or a small precomputed table refreshed by the pipeline Freshness matters more than repeat latency
Very large exports Full-year detail for a tenant Asynchronous job that writes a file Neither a cache hit nor a synchronous query fits

If you cannot name the class of a report, measure before choosing: log the normalized request key for a few weeks and count how often each key repeats between data loads. A key that never repeats before the data changes is a poor cache candidate however expensive it is.

Key the cache on the data version, not only on time

A time-based TTL guesses when data changes. When your pipeline records a load identifier, put it in the key and let invalidation happen by itself:

{tenant}/{report}/{report_version}/{data_version}/{sha256(normalized parameters)}.{format}

contoso/revenue-by-channel/v3/load-2026-11-06-0200/9f2c….csv
  • tenant first: a key or path that can be built without the tenant can be served to the wrong tenant;
  • report_version: changing the query or the output shape must not serve old files;
  • data_version: the identifier of the last successful load for the source tables, read from your execution log; a new load produces new keys and old entries simply stop being read;
  • normalized parameters: sorted, defaulted and typed, so equivalent requests share one key.

Keep a TTL as a safety net and for storage cleanup, not as the freshness mechanism.

Failure modes specific to caching

  • Stampede after a load. Every key becomes a miss at the same moment and the warehouse receives the whole morning’s traffic at once. Coalesce identical in-flight misses so one query fills the entry while other callers wait, or pre-render the most-requested keys as the last step of the load.
  • Late-arriving data. A correction lands after the load that the data version points to. Either bump the data version for corrections or exclude reports that tolerate no correction window from caching.
  • Partial writes. A result is returned to the caller but the cache write fails, or the write half-completes. Write to a temporary name and rename, and treat an unreadable entry as a miss rather than an error.
  • Storage that only grows. Pre-rendered files nobody opens. Record reads per entry and stop pre-rendering keys that are not read.

What to measure

Hit rate per report class (not overall), the age of the data at the moment a result is served, live query P95 and the share of misses that exceed it, storage bytes per tenant, and reads per stored entry. A rising hit rate with a rising served-data age is a warning, not a success.

Sources

Checked November 2026. Thresholds here are design guidance, not measured results from a specific system.

Tags

  • Data Architecture
  • API
  • Reporting
  • Caching
  • Performance
  • Multi-Tenancy