News for hackers. Stuff that matters.
Re:Cache is the new RAM by temuze on Wednesday November 19, 2014 @04:09PM (#8632638)
I come from a PSQL background where materialized views are manually refreshed :)

After skimming Oracle's docs, I'd settle for something as simple as:

CREATE MATERIALIZED VIEW my_mview

REFRESH FAST ON COMMIT

THROTTLE 10s

AS ( ... )

Does Oracle use deltas to refresh these mviews? It'd super cool if it did! For example, if the mview is a sum of a bunch of rows, then it could use the logged changes on those rows and its existing results to make the new mview.

Re:Cache is the new RAM by sehrope on Wednesday November 19, 2014 @04:36PM (#8632755)
Oracle supported both full refresh and incremental refresh as of at least 10 years ago (maybe longer).

Fast refresh requires creating "MATERIALIZED VIEW LOGS" on the source table(s) and covers most (but not all) aggregations/groupings in the mview SQL. Once it's setup, DML to the source tables gets logged to the mview logs and a "fast" refresh of the mview uses it to incrementally update the mview's data.