Understanding Materialized Views — Part 1

Learn the fundamentals of materialized views, how they reduce the cost of read queries, and what options it offer to synchronise with source data.

Dunith Danushka
Tributary Data

--

Photo by Olav Ahrens Røtne on Unsplash

I started a new article series sometime back to talk about streaming databases. While I was reading upon them, I found out that some of them are based on incrementally updated materialized views while others execute queries on demand but do it really fast.

So I thought of starting this article series to study materialized views in detail, then explore the potential of using stateful stream processing to make them great again.

This part discusses materialized views at a very high level. In the second part, you’ll see streaming materialized views.

Let’s start with a fictitious use case first.

Building a Twitter clone

Imagine you are building a Twitter clone.

The user’s “home timeline” would be the component that is receiving most of the read operations. Home timeline is supposed to show you all recent tweets by users you follow (including username and profile picture for the sender of each tweet).

--

--

Dunith Danushka
Tributary Data

Editor of Tributary Data. Technologist, Writer, Senior Developer Advocate at Redpanda. Opinions are my own.