Based on Harsh Sharma and Tara Khanna's session at NextQuery 2026, PhoenixAI's Data + AI Infrastructure Summit. Sharma is a senior platform engineer and Khanna a senior analytics engineer at Carbon Arc. Watch the session
About Carbon Arc
Carbon Arc builds a corpus of information about the economy. Its catalog holds about 500 data assets, such as card spend, insurance claims and website clicks, and it adds two to three new datasets every month.
Every asset is mapped to a common ontology, so the same retail chain can be found across datasets. Customers get the data where they work: delivered to S3, through the SDK or web application, or through an MCP server for AI agents.
Behind that sit about 15,000 aggregated tables over petabytes of data, and both numbers keep growing. API customers, AI agents and internal analysts query them in real time. Carbon Arc's internal latency SLO is about 1.5 seconds, and it has to hold as new datasets arrive.
The challenge
15,000 rebuilt tables on one shared Trino cluster
In Carbon Arc's original pipeline, Spark built Iceberg base tables with the mapped and derived data. dbt models then built the served tables, on Spark for the largest datasets and on Trino for everything else, for a net total of about 15,000 Iceberg tables. One open-source Trino cluster served them to API, MCP and ad hoc clients.
Each dataset run rebuilt hundreds to thousands of those tables, and the pipelines were painfully slow. Carbon Arc paid to run both Spark and Trino and to store every table, so cost grew with the number of tables rather than with how much customers queried them.
Open-source Trino also has no warehouse isolation. API customers, AI agents and ad hoc users all shared one Trino cluster, so a large ad hoc query, a wave of MCP queries or a running pipeline slowed down API customers.
Three things decided the move away from Trino: the cost of running it, runtimes that grew as new datasets arrived, and the need to keep the new system cheap to maintain. For how the two engines differ in general, see PhoenixAI vs. Trino.
The solution
Why Carbon Arc chose StarRocks on PhoenixAI
Carbon Arc chose StarRocks, powered by PhoenixAI, for query serving and kept Spark and Iceberg for the first half of the pipeline. The choice rested on four requirements:
- No vendor lock-in. The base tables already lived in Iceberg and had been through QA. StarRocks queries them in place, so Carbon Arc keeps an open format it owns and the rest of the pipeline stays as it was.
- Fast on plain views. If StarRocks views over Iceberg were fast enough, the 15,000 tables would not need to be built at all.
- Isolated workloads. API, MCP and ad hoc clients needed separate warehouses, so they could run at the same time without slowing each other down.
- Cost that follows usage. The bill should grow with how much customers query, not with the number of tables or views.
Proving StarRocks before cutover
Carbon Arc's team tested three things before switching from Trino to StarRocks. Real platform queries ran against plain StarRocks views over Iceberg at full scale, to show that customers would not notice the change from materialized tables. API, MCP and ad hoc load ran at the same time on separate warehouses, to check that no workload leaked into another. And every view had to return exactly what its table had.
Correctness was the hardest part. QA across 15,000 tables does not scale by hand, and Trino and StarRocks SQL differ slightly. Carbon Arc built scalable QA metrics and compared tables with views across the whole stack at cutover. Those comparisons caught real issues before customers did.
Replacing 15,000 tables with StarRocks views over Iceberg
Spark still cleans, aggregates and maps vendor data into Iceberg tables. About 15,000 StarRocks views now read those tables directly, and nothing downstream is materialized. Two changes to Carbon Arc's write path make that safe and cheap.

The first is Iceberg branching. With materialized tables, Carbon Arc could drop and replace a base table during an update, because the served tables were already built. StarRocks views read the live table, so the same approach would let a customer query a half-built table. Each update now builds on a new Iceberg branch while the views keep reading the live one. When every partition is written, Carbon Arc runs QA on the branch and merges it into main. The table changes in one atomic step, and customers never see a partial update.
The second is a metadata update in place of a rebuild. After a merge, the StarRocks views need no rebuild. The pipeline refreshes the StarRocks cache so queries read the latest Iceberg version, then records which views changed, when, and how. A dataset run that used to rebuild hundreds to thousands of tables is now a metadata update, and many of Carbon Arc's pipelines got faster.
Views defined as code
Carbon Arc defines all 15,000 StarRocks views with Pydantic models. Each column is typed as a filter, a metric or a core entity, columns combine into views, and views are grouped by topic. One topic configuration generates hundreds of views at a time, so a new view is a configuration entry, not SQL written by hand or by AI.

The models also record lineage. Carbon Arc can trace a vendor through every table it touches and list every column and filter for a topic, which keeps QA manageable. On Carbon Arc's MCP server, the metadata tells agents what each view holds before they query it, so they do not need exploratory queries against StarRocks to find out.
A warehouse for each query pattern
With publishing reduced to a metadata update, Carbon Arc's harder problem moved to the read path. Three groups query StarRocks in very different ways:
- API customers use the SDK or the web application to buy a specific insight, such as sales at one retailer in one city. Their queries are targeted and predictable.
- AI agents on the MCP server go in many directions. A question about pizza sales in Boston can lead to queries on card spend at large chains, foot traffic in stores, and flour and pepperoni shipments into the city. This traffic arrives in bursts.
- Internal ad hoc users join large, heavy tables.
Each group now has its own warehouse on PhoenixAI. Carbon Arc tunes each warehouse's concurrency limit, its queue length, and how long a query waits before it is rejected, so no workload can starve another.
Environments are split too. Carbon Arc first ran dev and prod on shared infrastructure, until one large test run hit the concurrency limits and broke everything. Dev and prod now run as separate StarRocks instances that do not share a frontend. Tests on tables before promotion run on a separate compute cluster, so no users are affected. Checks on unmaterialized views cost more, so Carbon Arc runs fewer, more targeted ones.
The results
Compared with Carbon Arc's Trino era:
- 10 to 11 times more queries. Under Trino, user queries sometimes failed or took too long. Carbon Arc now runs about 10 to 11 times more production queries a month on StarRocks.
- About the same spend. Total cost, license plus compute, is about what Carbon Arc spent on Trino and Spark.
- Up to 8 hours saved on pipelines. The served tables are no longer materialized, so some of Carbon Arc's major pipelines finish up to 8 hours sooner.
- Latency within the SLO. P90 latency is about 1.1 seconds against the internal SLO of about 1.5 seconds, with p50 at 0.2 seconds and p75 at 0.6 seconds over the last 30 days. Latency is about the same as before, at 10 to 11 times the query volume.
For related stories, see SmartNews on moving Trino workloads to PhoenixAI Cloud and TRM Labs on StarRocks over Apache Iceberg at petabyte scale.
What's next
More of Carbon Arc's StarRocks traffic now comes from AI agents. Compared with April, about five times more queries arrive as agent tool calls. The busiest minute carries 40 to 100 times the queries of the average minute, and one minute in four now has agent traffic, up from one in eight. The goal is to serve those bursts without paying much more.

Carbon Arc is working on four changes:
- Size for the burst. Plan capacity for the 40 to 100 times peak, not the average minute.
- Concurrency and tool call limits. Better limits keep any single user from flooding the cluster.
- Precompute common answers. Many queries ask the same questions, mostly about metadata and slowly changing data. Precomputed results answer them without touching the cluster.
- Materialize the slowest views. Some large views stay slow even with Iceberg pruning, sorting and better partitioning, so Carbon Arc is moving them into StarRocks materialized views.
Early results come from 49 benchmarked queries on six datasets, run with the query cache off. The median speedup was about 22 times. Measured by latency, the median slow query went from 7.4 seconds to 0.16 seconds.
