@jacques@mastodon.chester.id.au
Post #3585052
2026-06-30 21:39 UTC
@jamie@zomglol.wtf once found a slow DB query (assembled from strings, naturally) that had been wrapped in a materialized view. As in: send in query params, build the MV, then query it.
It struck me like a lightning bolt that someone read “MVs are faster” without understanding why
Replies (1)
-
@jamie@zomglol.wtf 2026-06-30 22:14
@jacques@mastodon.chester.id.au That's not far from what I'm dealing with. It's SQL view, transformed into a CTE (literally, the view definition is queried and then prepended into a `WITH` clause) so Postgres will materialize it at query time.