3.9. Create a Materialized View for Code Table Caching
Procedure 3.3. Create a Materialized View for Code Table Caching
- Create a view selecting the appropriate columns from the desired table. In general, this view may have an arbitrarily complicated transformation query.
- Designate the appropriate column(s) as the primary key. Additional indexes can be added if needed.
- Set the materialized property to true.
- Add a cache hint to the transformation query. To mimic the behavior of the implicit internal materialized view created by the lookup function, use the Hints and Options /*+ cache(pref_mem) */ to indicate that the table data pages should prefer to remain in memory.
Just as with the lookup function, the materialized view table will be created on first use and reused subsequently.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.