Materialized views are obviously useful

21 gz09 5 8/23/2025, 9:13:39 PM sophiebits.com ↗

Comments (5)

erulabs · 4h ago
What a great post. Humble and honest and simple and focused on an issue most developers think is so simple (“why not just vibe code SQL?”, “whatever, just scale up the RDS instance”).

Compliments aside, where this article stops is where things get exciting. Postgres shines here, as does Vitess, Cassandra, ScyllaDB, even MongoDB has materialized views now. Vitess and Scylla are so good, it’s a shame they’re not more popular among smaller startups!

What I haven’t seen yet is a really good library for managing materialized views.

Jupe · 3h ago
> (Technically speaking, if 100 people load the same page at the same time and the cache isn’t populated yet, then we’ll end up sending 100 queries to the database which isn’t amazing, but let’s just pretend we didn’t hear that.)

Isn't their tech to address that, like golang's "singleflight"?

quectophoton · 3h ago
> And then by magic the results of this query will just always exist and be up-to-date.

With PostgreSQL the materialized view won't be automatically updated though, you need to do `REFRESH MATERIALIZED VIEW` manually.

dalyons · 2h ago
Postgres materialized views are pretty terrible / useless compared to other rdbms. I’ve never found a usecase for the very limited pg version.
4ndrewl · 3h ago
Just landed here to write this. Materialized Views are _very_ implementation specific and are definitely _not_ magic.

It's important to understand how your implementation works before committing to it.

No comments yet