system.query_views_log Introspection
The Query Views Log Introspection tool provides insights into all query view executions on your ClickHouse cluster. It tracks how materialized views, live views, and other view types are being executed and their performance metrics.
It provides multiple filters and more dashboards on the metrics of views for better intropsection.
Prerequisites
Note: Read access to the
system.query_views_logtable is required to use this introspection tool. Ensure your user has the necessary system table privileges.
UI
Query Views Log Use Cases
View Performance Analysis
- Monitor View Duration: Track average view execution times to identify slow views
- Analyze Read Patterns: Use read rows/bytes charts to understand data consumption
- Track Write Patterns: Monitor written rows/bytes to see view output volume
- Compare Views: Filter by view_name to compare performance across different views
Error Debugging
- Filter by Exception: Use exception_code filter to focus on failed view executions
- View Error Details: Expand rows to see full error messages
- Track Error Frequency: Use distribution chart to see error spikes
- Identify Problematic Views: Filter by view_name and exception to find views with issues
View Optimization
- Identify Slow Views: Sort by view_duration_ms to find views that need optimization
- Monitor Resource Usage: Track peak_memory_usage and read/write patterns
- Compare Time Periods: Use time range selector to compare performance over time
- Node Comparison: Filter by hostname to compare view performance across nodes
Materialized View Monitoring
- Track Materialization: Monitor written_rows and written_bytes to see materialization activity
- Monitor Lag: Check event times to identify delays in materialized view updates
- Resource Planning: Use read/write metrics for capacity planning
- View Health: Track exception rates to ensure views are functioning correctly
Next Steps
- Query Log Inspector — Analyze specific query execution
- System Log Introspection — Overview of all system log tools
- system.ddl_distribution_queue Introspection — Monitor distributed DDL operations
- system.part_log Introspection — Monitor part-level operations
- system.query_log Introspection — Analyze query execution logs
