Re:Soft Deletion Probably Isn't Worth It
by rawgabbit on Tuesday January 09, 2024 @10:24PM
(#38935747)
DBs with Materialized Views
Here is the syntax for Snowflake. CREATE MATERIALIZED VIEW mymv COMMENT='filtered view' AS SELECT * FROM mytable WHERE isdeleted=0;
Why materialize? A normal view is sufficient
Re:Soft Deletion Probably Isn't Worth It
by rawgabbit on Wednesday January 10, 2024 @02:51PM
(#38942323)
It was to answer the OP question. Querying a materialized view is essentially the same as querying the original table. The MV allows for automated indexes etc.
I mean... a normal view hits all of the same properties, and is literally querying the original table. Materialization is an entirely orthogonal concern as far as I can think of.
Re:Soft Deletion Probably Isn't Worth It
by culturedsystems on Wednesday January 10, 2024 @04:14PM
(#38943255)
Temporal tables, aka system versioned tables, are something like this: https://mariadb.com/kb/en/system-versioned-tables/
Like, some way to create a special column that makes it so every query to that table automatically has a certain filter unless you use some other keyword to override it?