A materialized view stores the rows produced by its defining query. Reading it can avoid repeating expensive work, but changes to the source don't appear until you refresh it. State the freshness requirement before choosing this design for an operational report.
REFRESH MATERIALIZED VIEW rebuilds the stored result. A concurrent refresh allows readers to continue using the existing result, but it requires a qualifying unique index and an already populated materialized view. Do not treat CONCURRENTLY as a free substitute for planning resource use and refresh failures.
These tasks build and refresh real materialized views. A source write between creation and refresh makes stale data visible. Check both the result and the underlying relation kind. A normal view can return the same rows today while having a different persistence and freshness contract. No background scheduler runs in this browser workspace.
A materialized relation stores the aggregate and counts all order rows.