|
|
|
|
|
by pdkl95
2351 days ago
|
|
"There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors." (Phil Karlton, et al) Views (both regular and materialized) are really useful, but remember that storing data in two places really is one of the of the hard problems in CS. Refreshing the materialized view on a timer might seem easy, but 6 months from now when something important reads from the stale view instead of the real table could become a really frustrating bug. A materialized view might still be a worthwhile optimization; just remember that you're also adding cache management, which might be more complicated than you suspect. |
|
But yes, you're right that this is caching, with all associated pitfalls.