Available in versions: Dev (3.20) | Latest (3.19)

This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.

MATERIALIZED

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

A VIEW can be marked as MATERIALIZED, which means that its data as defined by SELECT * FROM view is stored on disk for faster retrieval, and synchronised with underlying tables either immediately when those tables are changed (similar to an index), or upon request (similar to a cache that is allowed to be stale).

// Create a new view
create.createMaterializedView("authors", "author_id", "first_name", "last_name")
      .as(select(AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME)
          .from(AUTHOR))
      .execute();
createMaterializedView("a", "id").as(select(AUTHOR.ID).from(AUTHOR))

References to this page

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo