Back to research

Data Systems / 2026-05-21

Materialized View API Serving Benchmark

This API-level benchmark tested whether StarRocks async materialized views could replace denormalized RDS tables for low-latency REST response shapes. The work covered 100k, 1m, and 10m row scales with exact payload parity checks.

Published Research Native report page
Scales 3

100k, 1m, and 10m rows

Endpoints 8

Overview, ranked lists, filters, snapshots

HTTP errors 0

No failed benchmark calls

Payload parity 100%

Canonical responses matched

Problem

Validate whether async materialized views could serve existing REST response shapes without sacrificing latency or payload correctness.

Approach

Benchmarked eight API endpoints across 100k, 1m, and 10m row scales with canonical payload parity checks at every scale.

Result

The StarRocks path was correct, but RDS remained faster for the tested low-latency REST shape; ingestion behavior remained a caveat.

Technologies
  • PostgreSQL
  • StarRocks
  • Iceberg
  • S3 Tables
  • Materialized Views
  • REST APIs
  • Docker

Executive readout

RDS remained the faster serving path for this specific REST API shape. At 10 million rows, sequential RDS p50 stayed between 0.91 ms and 14.40 ms across the eight endpoints, while StarRocks async materialized views ranged from 13.40 ms to 175 ms.

The recommendation was not to assume StarRocks async materialized views can replace RDS for low-latency REST serving without additional architecture work, even though the StarRocks path was functional and correct at 10 million rows.

What was compared

  • RDS path: temporary denormalized Postgres tables for snapshot data, filter options, and ranked result cards, with B-tree and GIN indexes.
  • StarRocks path: Iceberg base tables in AWS S3 Tables plus async materialized views using REFRESH DEFERRED MANUAL.
  • Fairness gate: every endpoint response was canonicalized and compared at every scale.

10M sequential latency

EndpointRDS p50StarRocks MV p50MV/RDS ratio
Overview cards rank 504.04 ms50.05 ms12.39x
Ranked items top 503.35 ms49.75 ms14.85x
Activity/day top 2006.56 ms56.78 ms8.66x
High-velocity items top 502.93 ms53.30 ms18.19x
Multi-filter items top 5014.40 ms175 ms12.16x
Search launch items top 508.22 ms42.34 ms5.15x
Filter options1.65 ms23.19 ms14.05x
Snapshot metadata0.91 ms13.40 ms14.73x

Setup and refresh costs

ScaleRDS totalStarRocks total
100k rows4.2 s29.5 s
1m rows30.4 s46.4 s
10m rows335.7 s110.8 s

StarRocks and S3 Tables caveat

Repeated appends into the same AWS S3 Tables Iceberg table failed from StarRocks with PreconditionFailed after the first append. A single large insert worked, but the exact append and commit behavior needs to be resolved before production ingestion can depend on this path.

  • Successful 10m run used reduced parallelism settings including enable_adaptive_sink_dop=false and pipeline_sink_dop=1.
  • The materialized view path can serve equivalent payloads, but ingestion behavior remains an architecture risk.

Detailed methodology and results

Supporting methodology, figures, and tables are rendered here as native page content with the same visual system as the rest of this website.

API-level benchmark using denormalized benchmark tables that mirror the REST API response shapes. Results were generated from the new 100k, 1m, and 10m runs saved in the benchmark result JSON.

Executive Readout

RDS remains the faster serving path for this API shape. At 10m rows, sequential RDS p50 latency stayed between 0.91ms and 14.40ms across the eight endpoints. StarRocks async MVs stayed between 13.40ms and 175ms .

The slowest relative 10m sequential endpoint was Content items, high-velocity tab, 50 rows , where StarRocks MV p50 was 18.19x RDS p50. Under 100-way concurrency, the category/country/language endpoint was the biggest gap: RDS p50 168ms versus StarRocks MV p50 2.21s .

Recommendation:

What Was Compared

RDS Path

  • Temporary denormalized PostgreSQL tables for snapshot, filters, and result cards.
  • B-tree indexes for sorted/filtered lookup paths plus GIN indexes for array/search fields.
  • API call executed through the benchmark HTTP service against RDS.

StarRocks MV Path

  • Iceberg base tables in AWS S3 Tables.
  • StarRocks asynchronous materialized views with REFRESH DEFERRED MANUAL .
  • Separate sorted content MVs for rank, activity/day, velocity, views, and published-at API sorts.
  • API call executed through the same benchmark HTTP service against StarRocks MVs.

Fairness check:

Payload Parity

ScaleRowsParityNote
100k100,0008/8 matchedAll canonicalized response payloads matched exactly
1m1,000,0008/8 matchedAll canonicalized response payloads matched exactly
10m10,000,0008/8 matchedAll canonicalized response payloads matched exactly

Sequential p50 Latency by Scale

These are single-client API calls after warmups. Ratios show StarRocks MV p50 divided by RDS p50.

ScaleEndpointRDS p50StarRocks MV p50MV / RDS
100kOverview cards, rank sort, 50 rows6.78ms46.83ms6.91x
100kContent items, rank sort, 50 rows2.81ms46.96ms16.71x
100kContent items, activity/day sort, 200 rows9.08ms54.17ms5.97x
100kContent items, high-velocity tab, 50 rows4.77ms48.44ms10.16x
100kContent items, brand + country + language, 50 rows13.15ms37.57ms2.86x
100kContent items, search launch, 50 rows3.50ms32.88ms9.39x
100kFilter options2.06ms22.00ms10.68x
100kSnapshot metadata1.17ms11.79ms10.08x
1mOverview cards, rank sort, 50 rows3.25ms48.67ms14.98x
1mContent items, rank sort, 50 rows2.91ms48.43ms16.64x
1mContent items, activity/day sort, 200 rows7.09ms55.04ms7.76x
1mContent items, high-velocity tab, 50 rows2.95ms49.69ms16.84x
1mContent items, brand + country + language, 50 rows3.69ms78.66ms21.32x
1mContent items, search launch, 50 rows3.21ms37.33ms11.63x
1mFilter options1.70ms21.07ms12.39x
1mSnapshot metadata1.16ms12.00ms10.34x
10mOverview cards, rank sort, 50 rows4.04ms50.05ms12.39x
10mContent items, rank sort, 50 rows3.35ms49.75ms14.85x
10mContent items, activity/day sort, 200 rows6.56ms56.78ms8.66x
10mContent items, high-velocity tab, 50 rows2.93ms53.30ms18.19x
10mContent items, brand + country + language, 50 rows14.40ms175ms12.16x
10mContent items, search launch, 50 rows8.22ms42.34ms5.15x
10mFilter options1.65ms23.19ms14.05x
10mSnapshot metadata0.91ms13.40ms14.73x

10m Concurrency Results

Concurrency levels were sequential, 5, 25, and 100. For concurrent runs, each worker issued 5 requests.

EndpointConcurrencyRDS p50RDS p95MV p50MV p95MV / RDS p50
Overview cards, rank sort, 50 rows14.04ms18.21ms50.05ms55.84ms12.39x
Overview cards, rank sort, 50 rows531.13ms108ms59.44ms73.31ms1.91x
Overview cards, rank sort, 50 rows2561.69ms612ms189ms251ms3.06x
Overview cards, rank sort, 50 rows100237ms522ms673ms1.20s2.84x
Content items, rank sort, 50 rows13.35ms31.42ms49.75ms52.91ms14.85x
Content items, rank sort, 50 rows59.41ms13.75ms65.42ms98.96ms6.95x
Content items, rank sort, 50 rows2544.33ms54.72ms237ms260ms5.35x
Content items, rank sort, 50 rows100174ms366ms716ms1.04s4.11x
Content items, activity/day sort, 200 rows16.56ms23.38ms56.78ms61.19ms8.66x
Content items, activity/day sort, 200 rows526.44ms38.04ms92.59ms106ms3.50x
Content items, activity/day sort, 200 rows25123ms155ms386ms411ms3.14x
Content items, activity/day sort, 200 rows100459ms1.03s862ms1.93s1.88x
Content items, high-velocity tab, 50 rows12.93ms26.12ms53.30ms81.39ms18.19x
Content items, high-velocity tab, 50 rows59.91ms23.39ms62.60ms87.43ms6.32x
Content items, high-velocity tab, 50 rows2548.63ms73.13ms241ms260ms4.96x
Content items, high-velocity tab, 50 rows100169ms348ms901ms1.38s5.34x
Content items, brand + country + language, 50 rows114.40ms31.97ms175ms349ms12.16x
Content items, brand + country + language, 50 rows510.76ms17.40ms201ms390ms18.67x
Content items, brand + country + language, 50 rows2547.61ms69.38ms460ms503ms9.66x
Content items, brand + country + language, 50 rows100168ms392ms2.21s3.07s13.12x
Content items, search launch, 50 rows18.22ms23.18ms42.34ms227ms5.15x
Content items, search launch, 50 rows510.09ms20.60ms80.11ms263ms7.94x
Content items, search launch, 50 rows2548.11ms59.50ms141ms195ms2.94x
Content items, search launch, 50 rows100157ms401ms468ms827ms2.98x
Filter options11.65ms3.42ms23.19ms100ms14.05x
Filter options59.94ms16.13ms24.16ms36.04ms2.43x
Filter options2525.53ms37.33ms45.55ms110ms1.78x
Filter options10076.92ms167ms265ms489ms3.44x
Snapshot metadata10.91ms4.33ms13.40ms81.02ms14.73x
Snapshot metadata51.77ms11.44ms13.73ms30.22ms7.76x
Snapshot metadata259.63ms21.19ms29.63ms52.82ms3.08x
Snapshot metadata10046.19ms70.72ms138ms334ms2.99x

Setup And Refresh Costs

Setup timings are not request latency, but they matter operationally because the proposed path needs data load and MV refresh before API reads.

ScaleRowsRDS loadRDS index/analyzeRDS totalStarRocks base loadMV refresh sumStarRocks total
100k100,0001.6s2.5s4.2s2.6s13.5s29.5s
1m1,000,00013.8s16.4s30.4s5.9s26.8s46.4s
10m10,000,000144.6s190.9s335.7s33.3s63.9s110.8s

Materialized View Refresh Detail

ScaleMVRefresh Time
100kfilt1.8s
100ksnap2.1s
100kcontent_published1.9s
100kcontent_rank1.7s
100kcontent_velocity2.0s
100kcontent_views2.2s
100kcontent_vpd1.7s
1mfilt1.7s
1msnap1.8s
1mcontent_published4.0s
1mcontent_rank5.4s
1mcontent_velocity5.1s
1mcontent_views4.4s
1mcontent_vpd4.3s
10mfilt1.8s
10msnap1.9s
10mcontent_published12.6s
10mcontent_rank14.6s
10mcontent_velocity11.2s
10mcontent_views11.3s
10mcontent_vpd10.6s

Important StarRocks / S3 Tables Finding

Repeated appends into the same AWS S3 Tables Iceberg table failed from StarRocks with PreconditionFailed errors after the first append. This reproduced in a targeted StarRocks-only 2m test: the first 1m insert committed, the second 1m append failed after retries.

A single large insert did work. The successful 10m run loaded the content base table as one insert and used these StarRocks session settings:

  • SET enable_adaptive_sink_dop = false
  • SET pipeline_sink_dop = 1
  • SET pipeline_dop = 1
  • SET max_pipeline_dop = 1
  • SET parallel_fragment_exec_instance_num = 1

Implication:

Interpretation

  • For low-latency REST reads, RDS is still the stronger fit in this benchmark. It stays in the low single-digit millisecond range for the indexed 50-row endpoints at 10m rows.
  • StarRocks MV latency is more stable than direct Iceberg querying, but it still has a baseline tens-of-milliseconds cost and degrades sharply on the category/country/language case at 10m rows.
  • The denormalized model is appropriate for this API comparison. Because the tables are intended to be direct API equivalents, the payload parity checks are the right correctness gate.
  • The next useful work is not another synthetic scale alone. The next report should add production-like filter cardinality, distribution skew, refresh frequency, cold/warm cache separation, and API service overhead from the actual application code path.

Benchmark Provenance

  • Benchmark result JSON retained as local source data
  • Native report page generated from the local benchmark notes
  • Temporary AWS resources were removed after the run: S3 Tables benchmark tables, StarRocks secret, IAM inline policy, and runner temp files.