Re:Materialized View: SQL Queries on Steroids
by canada2020 on Sunday January 01, 2023 @12:18AM
(#34203832)
But when do you refresh the materialized views?
[ Parent
| on HN ]
Re:Materialized View: SQL Queries on Steroids
by smitty1e on Sunday January 01, 2023 @12:27AM
(#34203881)
Presumably when underlying data are updated.
Re:Materialized View: SQL Queries on Steroids
by yCombLinks on Sunday January 01, 2023 @01:00AM
(#34204029)
Lots of strategies are possible. I may only need to refresh the data in it once a day. I may need to refresh it on every write. It depends on the applications needs.
Re:Materialized View: SQL Queries on Steroids
by canada2020 on Sunday January 01, 2023 @01:28AM
(#34204152)
I see. Given it’s so flexible, is this pretty much like a caching layer?
Re:Materialized View: SQL Queries on Steroids
by quickthrower2 on Sunday January 01, 2023 @06:00AM
(#34205373)
In SQL Server it is part of the transaction that affected the underlying data. So you don’t worry about that. Instead you worry about lock escalations!
Re:Materialized View: SQL Queries on Steroids
by dineshgowda24 on Sunday January 01, 2023 @12:27PM
(#34208432)
For us, real-time refreshes weren't necessary. So we ended up refreshing it every 12 hours through application crons.