Materialized views are obviously useful – Sophie Alpert
As programmers we spend a lot of time shuttling data back and forth between different systems and transforming it from one format to another. Sometimes it gets pretty miserable! Let’s say you’re making a fancy task tracking app. Tasks belong to projects, and on the projects page, you want to show how many tasks are in each project. Maybe you start with a little SQL that you call from your “get info about project” view model code: Wow! So easy. Uh oh, someone is tapping you on the shoulder and saying this is too slow because it has to do a complete index scan of the tasks for the project, every time you load the page. That’s fine, we’ll just put a… Redis cache on it? Works great. It’s fast enough. (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.) Unfortunately our users are complaining that the count is wrong a
Materialized views are obviously useful August 22, 2025 As programmers we spend a lot of time shuttling data back and forth between different systems and transforming it from one format to another. Sometimes it gets pretty miserable! Let’s say you’re making a fancy task tracking app. Tasks belong to projects, and on the projects page, you want to show how many tasks are in each project. Maybe you start with a little SQL that you call from your “get info about project” view model code: async function getTaskCountForProject ( projectId ) { return await db. query ( 'select count(1) from tasks whe
Explore this link on the map →saved by
related reading
- PostgreSQL View vs Materialized View: A Guidedbvis.com
- postgresql - How can I ensure that a materialized view is always up to date? - Stack Overflowstackoverflow.com
- Incremental Database Computationsfeldera.com
- PostgreSQL: Documentation: 18: REFRESH MATERIALIZED VIEWpostgresql.org
- Building data-centric apps with a reactive relational databaseriffle.systems
- Everything I know about good system designseangoedecke.com
- Streaming ingestion to a materialized view - Amazon Redshiftdocs.aws.amazon.com
- Postgresql tricks | Lanre Adelowolanre.wtf
- learning-notes/books/designing-data-intensive-applications.md at master · keyvanakbary/learning-notes · GitHubgithub.com
- Cleaned-up transcript of Rich Hickey's talk "Deconstructing the Database" · GitHubgist.github.com
- GitHub - blacksmithgu/datacore: Work-in-progress successor to Dataview with a focus on UX and speed. · GitHubgithub.com
- Build Your Own Databasenan.fyi