madams
Contributor III

Oh no!  I swear I wrote a reply out, but I must not have submitted it.  Setting that aside...

I think in your case a materialized view makes the most sense, and it's what I'd go with.  It's essentially precomputing the logic, but reusing some of the storage on disk.  Definitely look into liquid clustering to help with performance on your common joins.

View solution in original post