Overview
Materialize exposes comprehensive operational metrics through system catalog tables in themz_catalog and mz_internal schemas. This guide covers essential monitoring queries for tracking cluster health, query performance, resource usage, and dataflow metrics.
System Catalog Overview
Catalog Schemas
Materialize provides three main catalog schemas:mz_catalog: Stable metadata about objects (sources, views, indexes, clusters)mz_internal: Internal metrics and operational data (not stable, may change)mz_introspection: Dataflow-level debugging and performance data
Key Monitoring Tables
| Table | Schema | Purpose |
|---|---|---|
mz_clusters | mz_catalog | Cluster configuration |
mz_cluster_replicas | mz_catalog | Replica information |
mz_cluster_replica_metrics | mz_internal | Resource utilization |
mz_recent_activity_log | mz_internal | Query execution history |
mz_cluster_replica_frontiers | mz_catalog | Data freshness tracking |
mz_materialized_views | mz_catalog | Materialized view metadata |
mz_indexes | mz_catalog | Index metadata |
Cluster Monitoring
Cluster Resource Utilization
Monitor CPU, memory, and disk usage across all clusters:Historical Resource Usage
Track resource trends over time:Cluster Status Overview
Get a quick status of all clusters:Identifying High Memory Clusters
Find clusters approaching memory limits:Query Performance Monitoring
Recent Query Activity
View recent queries with execution details:Slow Query Detection
Identify queries taking longer than a threshold:Query Success Rate
Calculate query success metrics:Query Execution Strategies
Analyze how queries are executed:constant: Computed in control planefast-path: Read directly from in-memory indexstandard: Computed by temporary dataflow
Dataflow Health Monitoring
Materialized View Lag
Check if materialized views are behind:Index Freshness
Monitor index data freshness:Source Ingestion Status
Monitor source ingestion progress:Object Inventory
Objects by Cluster
List all objects on each cluster:Storage Usage by Object Type
Identify storage consumption:Largest Objects
Find objects consuming the most storage:Audit and Security Monitoring
Recent DDL Changes
Track schema modifications:Cluster Changes
Monitor cluster modifications:User Activity Summary
Summarize activity by user:Credit Usage Tracking
Current Credit Consumption Rate
Calculate hourly credit usage:Total Environment Cost
Sum all cluster costs:Alerting Queries
High Memory Alert
Lagging Materialized Views
Failed Queries Alert
Best Practices
Monitoring Strategy
- Establish baselines: Track normal resource usage patterns
- Set up alerts: Configure proactive notifications for anomalies
- Regular reviews: Weekly review of slow queries and resource usage
- Capacity planning: Monitor trends to anticipate scaling needs
- Document thresholds: Define what “normal” looks like for your workloads
Query Optimization
- Use temporal filters: Limit historical data in monitoring queries
- Aggregate when possible: Summarize instead of returning raw data
- Index monitoring views: Create indexes on frequently queried system tables
- Schedule reports: Run heavy monitoring queries during off-peak hours
Retention Considerations
mz_recent_activity_log: Retains data for 24 hoursmz_cluster_replica_metrics_history: Check retention policymz_audit_events: Persistent, consider archiving old events