There is no single best streaming database in 2026. RisingWave and Materialize are PostgreSQL-compatible streaming databases with a serving layer built in. Apache Flink and Spark Structured Streaming are stream processors that you pair with a separate store for serving. ksqlDB is a SQL layer over Kafka Streams that only works with Kafka. This guide explains what each one does well, where each one falls short, and the situations in which you should choose it, including the situations in which RisingWave is the wrong choice.
Disclosure. This article is published by RisingWave Labs, the company behind RisingWave, one of the systems discussed here. We do not rank the systems. Every vendor section links to that vendor's own documentation and license so you can check our claims. The only performance figure quoted is a vendor-run benchmark with a published configuration, labelled as such. Facts were last verified on 8 November 2026. For a wider comparison that also covers Timeplus Proton, Feldera and Arroyo, see our streaming database comparison hub.
Why the question changed between 2023 and 2026
Three years ago the default answer to "how do we process streams" was Apache Flink, with ksqlDB as the quick option for teams already on Kafka. Everyone else assembled a stream processor, a message bus and an OLAP database for serving.
Three things changed.
AI agents became consumers of streaming data. Agents that answer questions about the current state of a business or trigger actions need results that are seconds old, not hours old. They connect over standard protocols, usually PostgreSQL wire protocol or an MCP server. Systems that expose incrementally maintained results over a SQL interface fit this pattern without extra plumbing.
Apache Iceberg became the default lakehouse table format. New projects mostly chose Iceberg over Delta Lake and Hudi. A stream processor that cannot write Iceberg tables with exactly-once guarantees now looks incomplete, and the question of who maintains the Iceberg catalog and runs compaction became part of the evaluation.
PostgreSQL compatibility became an expectation. After years of PostgreSQL-compatible APIs across the database market, teams expect a new system to work with psql, JDBC, dbt and their BI tool without custom drivers. Systems with their own dialect or protocol still have valid reasons to exist, but they now have to justify the friction.
What counts as a streaming database
The term is used loosely, so it helps to be precise.
A stream processor (Apache Flink, Spark Structured Streaming, Arroyo, Bytewax) reads events, transforms them and writes the result to a sink. It has no query interface of its own. You cannot connect with a SQL client and ask for the current top ten by revenue; you ask the sink.
A streaming database (RisingWave, Materialize, Feldera, Timeplus Proton) does the same processing and also serves the result. Materialized views are maintained incrementally as events arrive and are queryable immediately with ordinary SQL.
A real-time OLAP database (ClickHouse, Apache Pinot, Apache Druid, StarRocks) ingests quickly and recomputes analytical queries at query time over large tables. It does not maintain the result of a defined query incrementally. Many teams feed one of these from a stream processor or a streaming database and use it for ad hoc exploration.
The rest of this article covers the five systems that come up most often in a streaming database evaluation. Two are streaming databases, two are stream processors, and ksqlDB sits in between.
The five systems side by side
| Dimension | Apache Flink | Materialize | ksqlDB | Spark Structured Streaming | RisingWave |
|---|---|---|---|---|---|
| Category | Stream processor | Streaming database | SQL layer on Kafka Streams | Stream processor (micro-batch) | Streaming database |
| License | Apache 2.0 | Business Source License 1.1; Community edition needs a license key | Confluent Community License, not OSI open source | Apache 2.0 | Apache 2.0 |
| SQL interface | Flink SQL and Table API | PostgreSQL wire protocol and dialect | ksql dialect | Spark SQL and DataFrame API | PostgreSQL wire protocol and dialect |
| Query the result in the same system | No, results go to a sink | Yes | Pull queries on tables | No | Yes |
| CDC without Kafka in the path | Flink CDC connectors | PostgreSQL, MySQL, SQL Server | No, Kafka only | No | PostgreSQL, MySQL, SQL Server, MongoDB |
| Processing latency | Milliseconds | Milliseconds to low seconds | Milliseconds | Seconds (micro-batch) | Milliseconds to low seconds |
| Complex event processing | MATCH_RECOGNIZE and CEP library | No | No | No | No |
| Vector type and index | No | Not documented | No | Via MLlib, batch oriented | vector(n) type, HNSW index, openai_embedding() |
| Apache Iceberg | Mature connector; you run the catalog | Iceberg sink | Via Kafka Connect | Iceberg and Delta connectors | Sink, source, hosted REST catalog and compaction |
| Typical operating model | JobManager, TaskManagers, state backend, checkpoints | Materialize Cloud or self-managed with license key | Confluent Platform or Confluent Cloud | Spark cluster, Databricks, EMR | Single binary, Kubernetes, RisingWave Cloud, BYOC |
License terms change. Read the current LICENSE file before deciding; the links above point at the files themselves.
Apache Flink
Apache Flink is the most capable stream processor available. Alibaba, Uber, Netflix and LinkedIn run it at a scale most teams will never reach. Its stateful processing model handles exactly-once semantics, complex event processing and arbitrary custom operators written in Java, Scala or Python.
Real strengths. The DataStream API lets you write any stateful operator you can imagine. Flink SQL is the only SQL dialect in this comparison with full MATCH_RECOGNIZE support for pattern detection across event sequences, and the CEP library goes further. You control state backends, checkpoint intervals and memory in detail, which matters when keyed state reaches hundreds of gigabytes. The Iceberg connector is mature, and managed Flink is available from Confluent, Ververica, AWS, Decodable, DeltaStream and others.
Real limitations. Flink is not a database. A job computes a result and writes it to a sink: a Kafka topic, a JDBC table, an Iceberg file, a Redis key. Querying that result needs a second system, and keeping the two in sync is your job. Running Flink well requires JVM and state backend expertise, savepoint management for upgrades and a monitoring story across the processor and the sink. Flink SQL covers common aggregations and joins but has a smaller function library than PostgreSQL.
Choose Flink when you need MATCH_RECOGNIZE or CEP, custom operators that SQL cannot express, fine control over very large keyed state, or when your organisation already runs Flink and has the people to operate it. Pair it with a serving store and plan for that store as part of the project.
Materialize
Materialize is a streaming SQL database built on Timely and Differential Dataflow, with PostgreSQL wire protocol compatibility and incrementally maintained materialized views. It is the system most often compared directly with RisingWave because both maintain views incrementally and serve them over PostgreSQL protocol.
Real strengths. Materialize has made strong consistency a central design choice: queries see a consistent snapshot across views, with strict serializability as the default isolation level. Its SQL coverage is broad and its documentation on idiomatic streaming SQL is good. Native sources cover PostgreSQL, MySQL, SQL Server, Kafka, Redpanda and webhooks, and it can sink to Apache Iceberg. Materialize Cloud is a mature managed service.
Real limitations. Materialize is distributed under the Business Source License. It is source-available, not open source in the OSI sense, and each release converts to an open license four years after publication. Self-managed deployments require a license key even for the free Community edition, which also carries documented resource caps. Enterprise and Cloud pricing is quoted by sales. As of November 2026 the documentation does not describe a vector type, embedding functions or an official MCP server. Compute sizing is memory driven, which can make large state expensive.
Choose Materialize when strict serializability across views is a hard requirement for your application, you want a PostgreSQL-compatible streaming database with that guarantee at its core, and the Community edition limits or the Enterprise price fit your situation.
ksqlDB
ksqlDB is Confluent's streaming SQL layer on top of Kafka Streams. It lets you filter, transform, aggregate and join Kafka topics in SQL without writing a Kafka Streams application in Java.
Real strengths. For a team that already runs Confluent Platform or Confluent Cloud, ksqlDB is the lowest-friction way to get SQL over topics. It supports both push queries (continuous) and pull queries (point lookups against a table), and it is bundled with the platform you already pay for.
Real limitations. ksqlDB only reads from and writes to Kafka. There are no direct CDC sources; database changes have to arrive through Kafka Connect. Joins are more restricted than in a full streaming database, and results live in Kafka topics or in ksqlDB tables with limited query flexibility, so most analytical use cases still need a downstream store. The license is the Confluent Community License, which is not OSI-approved. Confluent's own documentation now states that for new stream processing workloads Confluent Platform for Apache Flink is the recommended engine, with ksqlDB remaining supported for existing applications.
Choose ksqlDB when your inputs and outputs are all Kafka topics, your transformations are simple filters, aggregations and stream-table joins, you are committed to Confluent, and you have read Confluent's current roadmap and are comfortable starting a new project on it.
Apache Spark Structured Streaming
Spark Structured Streaming extends the Spark DataFrame API to streams using a micro-batch execution model. Each trigger runs a small Spark job over the new data and writes the result to a sink.
Real strengths. If your organisation already runs Spark, Structured Streaming reuses the cluster, the skills and the data access patterns you have. Joining a stream against a large dimension table in object storage is natural. Delta Lake and Iceberg integration is mature, PySpark makes it accessible to Python-first teams, and managed options (Databricks, EMR, Dataproc) are everywhere.
Real limitations. Micro-batch means latency of seconds, not milliseconds. There is no serving layer; results go to Delta, Iceberg or a JDBC sink and you query them elsewhere. Spark cluster tuning (executor sizing, shuffle, driver failures) needs platform expertise, and the streaming semantics are less expressive than Flink's for event-time edge cases.
Choose Spark Structured Streaming when latency of a few seconds or more is acceptable, your team lives in Spark or Databricks, and most of your pipeline is batch with a streaming edge.
RisingWave
RisingWave is an open source, PostgreSQL-compatible streaming database. You define sources, materialized views and sinks in SQL; the system maintains the views incrementally as data arrives; and you query them with any PostgreSQL client on port 4566.
Real strengths. The serving layer is built in, so a dashboard, an application or an AI agent reads the maintained result directly instead of going through a separate OLAP store. Materialized views are updated incrementally: only the rows affected by new events are recomputed. Native CDC connectors for PostgreSQL, MySQL, SQL Server and MongoDB mean you do not need Debezium or Kafka in the path for database change capture. State lives in RisingWave's own storage engine on S3-compatible object storage, so compute nodes are stateless and recovery does not move state between machines. For Apache Iceberg, RisingWave can write tables continuously, host a REST catalog and run compaction itself. For AI workloads it has a vector(n) type, HNSW vector indexes, an openai_embedding() function and an official MCP server. The license is Apache 2.0.
Real limitations. RisingWave does not support MATCH_RECOGNIZE or a CEP library; pattern detection across event sequences is better served by Flink. It provides exactly-once processing and snapshot-consistent reads across materialized views, but it does not offer Materialize's strict serializability across arbitrary interactive transactions. It is not an OLAP engine: ad hoc scans over tens of terabytes of history belong in ClickHouse, Pinot or an Iceberg query engine, possibly fed by RisingWave. Its community is smaller than Flink's or Spark's.
Choose RisingWave when you want PostgreSQL-compatible streaming SQL with the serving layer included, CDC from PostgreSQL or MySQL without running Kafka, incrementally maintained joins and aggregations that applications and agents query directly, continuous ingestion into Iceberg with the catalog handled for you, and an Apache 2.0 license.
When RisingWave is the wrong choice
We would rather you find this out from us than after a migration.
- You need complex event processing. Sequence patterns with
MATCH_RECOGNIZE, or custom stateful operators in Java, are Flink territory. RisingWave can express a great deal in SQL, but not that. - Strict serializability across interactive transactions is a hard requirement. If your correctness argument depends on that specific guarantee, Materialize was designed around it and RisingWave was not.
- Your workload is ad hoc analytics over long history. If analysts run exploratory queries over years of data, you want a real-time OLAP database. RisingWave can keep that store fresh, but it should not be the thing analysts scan.
- Your team is productive on Flink and the problem is not operational. If Flink works and the pain you are trying to fix is something else, switching engines will not fix it.
- Your logic is Python-native and not expressible in SQL. Bytewax or Spark may fit better than any SQL-first system.
Three questions that usually settle it
Do you need to query the result inside the same system? If yes, you want a streaming database (RisingWave or Materialize), not a stream processor. Stream processors compute; serving is a second project.
Is OSI open source licensing a requirement? If yes, Materialize and ksqlDB are out. RisingWave, Flink and Spark are Apache 2.0.
Does your logic need CEP or custom operators? If yes, Flink. If your logic fits in SQL, a streaming database removes a cluster and a sink from your architecture.
| Situation | Fits |
|---|---|
| Real-time dashboard or API served directly from maintained SQL results | RisingWave or Materialize |
| CDC from PostgreSQL or MySQL with no Kafka in the stack | RisingWave or Materialize |
| Strict serializability across views as a hard requirement | Materialize |
| Pattern detection across event sequences, custom Java operators | Apache Flink |
| Very large keyed state with hands-on control over state backends | Apache Flink |
| Batch-heavy pipeline with a streaming edge, seconds of latency acceptable | Spark Structured Streaming |
| Simple transformations where everything is already a Kafka topic | ksqlDB, after checking Confluent's roadmap |
| Continuous ingestion into Apache Iceberg with catalog and compaction handled | RisingWave |
| Vector search or embeddings over continuously updated data | RisingWave |
| Ad hoc exploration over years of history | A real-time OLAP database, fed by one of the above |
Example: CDC to a queryable view in RisingWave
Here is the pattern that most often brings teams to a streaming database: live order analytics from a PostgreSQL transactional database, served to a dashboard, with no Kafka or Flink in between. The syntax follows the PostgreSQL CDC documentation.
Create a shared CDC source and a table for the upstream orders table:
CREATE SOURCE pg_source WITH (
connector = 'postgres-cdc',
hostname = 'prod-pg.internal',
port = '5432',
username = 'risingwave',
password = 'secret',
database.name = 'ecommerce',
schema.name = 'public'
);
CREATE TABLE orders (
order_id BIGINT PRIMARY KEY,
region VARCHAR,
amount NUMERIC,
created_at TIMESTAMPTZ,
updated_at TIMESTAMPTZ
) FROM pg_source TABLE 'public.orders';
Create a materialized view that aggregates revenue by region. It is updated incrementally as orders are inserted, updated or deleted upstream:
CREATE MATERIALIZED VIEW revenue_by_region AS
SELECT
region,
COUNT(*) AS order_count,
SUM(amount) AS total_revenue,
AVG(amount) AS avg_order_value,
MAX(updated_at) AS last_updated
FROM orders
GROUP BY region;
Query it from any PostgreSQL client:
SELECT region, order_count, total_revenue
FROM revenue_by_region
ORDER BY total_revenue DESC;
For a time-windowed view, use the TUMBLE table function:
CREATE MATERIALIZED VIEW revenue_per_5min AS
SELECT
region,
window_start,
window_end,
SUM(amount) AS revenue
FROM TUMBLE(orders, created_at, INTERVAL '5' MINUTE)
GROUP BY region, window_start, window_end;
If you want windows to close and emit final results rather than update continuously, add a watermark to the source and use EMIT ON WINDOW CLOSE on the view. Without a watermark, windowed views update as late data arrives, which is often what a dashboard wants anyway.
The same pattern in Materialize looks similar at the view level and differs in source syntax. In Flink or Spark the view becomes a job plus a sink table in a separate database.
What is actually published on performance
As of November 2026 there is no independent, like-for-like benchmark across all five systems.
RisingWave Labs publishes a Nexmark benchmark with the hardware, configuration and queries documented. It is a vendor-run benchmark; we publish the setup so it can be reproduced and challenged. Materialize and other vendors publish their own, also vendor-run. Treat all of them as starting points.
The practical advice is to run your own top five queries, on your own data, at your expected event rate, on two or three candidates. Each of these systems can be running in Docker within an hour, so a one-week bake-off is cheap compared with a wrong choice.
FAQ
What is a streaming database?
A streaming database continuously ingests event streams or CDC data and maintains the results of SQL queries incrementally. You define a materialized view once, the database keeps it current as new data arrives, and clients read the current result with ordinary SQL. It differs from a stream processor, which writes results elsewhere, and from an OLAP database, which recomputes queries at query time.
Is there one best streaming database in 2026?
No. The systems differ on consistency guarantees, SQL dialect, where state lives, licensing and operating model. The right choice depends on whether you need a built-in serving layer, whether Kafka is already in your stack, how strict your consistency requirement is, whether you need CEP, and whether your team's skills are PostgreSQL, Flink or Spark.
How is a streaming database different from Apache Flink?
Flink is a stream processor. It reads streams, transforms them and writes results to a sink such as Kafka, a relational database or Iceberg. You query the sink, not Flink. A streaming database such as RisingWave or Materialize processes the stream and serves the result over SQL in the same system. Flink in turn offers CEP and custom operators that streaming databases do not.
Does RisingWave replace Kafka?
No. RisingWave reads from Kafka, Pulsar, Kinesis and other sources and can write back to them. Its native CDC connectors let you skip Kafka for database change capture, but it is not an event bus for producer-consumer messaging between services.
Which of these are open source?
RisingWave, Apache Flink and Spark are Apache 2.0. Materialize uses the Business Source License, which is source-available and converts to an open license four years after each release. ksqlDB uses the Confluent Community License, which is source-available but not OSI-approved.
Can AI agents use a streaming database?
Yes. Because RisingWave and Materialize speak the PostgreSQL wire protocol, any agent framework with a PostgreSQL client can query maintained views. RisingWave also ships an official MCP server, so MCP-compatible agents can list and query materialized views without custom integration code.
Where to go next
This article covers the five systems that come up most often. For Timeplus Proton, Feldera and Arroyo, pricing models, and a methodology section, see the streaming databases compared hub. For a deeper look at the Flink decision specifically, see Apache Flink alternatives for SQL teams and choosing a Flink alternative by architecture. If you are coming from Materialize, see Materialize alternatives: when to switch and when to stay.
If you find a factual error in this article, open an issue and we will correct it.

