Share via

Does predictive optimization support materialized views in Unity Catalog?

2026-06-03T20:33:18.2633333+00:00
  • I'm running ALTER TABLE ... ENABLE PREDICTIVE OPTIMIZATION on a materialized view in a Unity Catalog managed catalog.
  • I receive error: INVALID_PARAMETER_VALUE.PREDICTIVE_OPTIMIZATION_UNSUPPORTED_CATALOG
  • The documentation says "Only Unity Catalog managed tables are supported" but doesn't explicitly mention materialized views in the limitations section.
  • Additionally, DESCRIBE CATALOG EXTENDED shows predictive optimization is DISABLE (inherited from METASTORE) — is that a prerequisite for table-level enablement, or can the catalog owner override it independently?
Azure Databricks
Azure Databricks

An Apache Spark-based analytics platform optimized for Azure.


1 answer

Sort by: Most helpful
  1. AI answer

    2026-06-03T20:33:33.7133333+00:00

    Predictive optimization does not support materialized views. The feature explicitly applies only to Unity Catalog managed tables, not to views or materialized views. The error INVALID_PARAMETER_VALUE.PREDICTIVE_OPTIMIZATION_UNSUPPORTED_CATALOG is consistent with attempting to use predictive optimization on an unsupported object type or catalog.

    Regarding prerequisites and inheritance:

    • Predictive optimization is only available for Unity Catalog managed tables in managed catalogs that are eligible for predictive optimization.
    • Catalogs, schemas, and tables follow an inheritance model:
      • Account → Catalog → Schema → Table.
      • By default, catalogs are created with predictive optimization set to INHERIT from the account, and tables inherit from the schema.
    • Catalog-level predictive optimization can be controlled independently (subject to permissions and catalog eligibility):
      • ALTER CATALOG [catalog_name] { ENABLE | DISABLE | INHERIT } PREDICTIVE OPTIMIZATION;
      • A catalog owner (with required permissions) can ENABLE predictive optimization at the catalog level even if the account default is disabled, provided the catalog is a non-Delta Sharing, managed Unity Catalog catalog that is eligible for predictive optimization.
    • DESCRIBE CATALOG EXTENDED showing Predictive Optimization = DISABLE (inherited from METASTORE) means:
      • The catalog is currently inheriting a disabled setting from the account/metastore.
      • This inherited setting can be overridden at the catalog level with ENABLE PREDICTIVE OPTIMIZATION if the catalog meets the eligibility requirements.

    For tables:

    • By default, tables inherit from the schema: INHERIT.
    • Predictive optimization can be explicitly enabled at the table level:
      • ALTER TABLE my_table ENABLE PREDICTIVE OPTIMIZATION;
    • When predictive optimization is enabled or inherited as enabled on a managed table, Azure Databricks automatically invokes OPTIMIZE, VACUUM, and ANALYZE as appropriate.

    In summary:

    • Materialized views are not supported by predictive optimization; only Unity Catalog managed tables are.
    • Catalog-level predictive optimization is not a hard prerequisite for table-level enablement; a catalog owner can override inheritance and enable predictive optimization at the catalog level (and table owners can enable it at the table level) as long as the catalog and table are eligible Unity Catalog managed objects.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.