Query Analytics
The Query Engine's analytics subsystem provides comprehensive visibility into query execution patterns, performance trends, resource consumption, and optimization opportunities. The AnalyticsController exposes these capabilities through the /v1/analytics REST API.
Analytics Endpoints Overview
| Endpoint | Method | Description |
|---|---|---|
/v1/analytics | GET | Comprehensive analytics dashboard |
/v1/analytics/summary | GET | Summary statistics |
/v1/analytics/trends/{metric} | GET | Trend analysis for a specific metric |
/v1/analytics/insights | GET | Actionable insights and recommendations |
/v1/analytics/compare | GET | Compare performance between time periods |
/v1/analytics/engines | GET | Per-engine statistics |
/v1/analytics/users | GET | Per-user statistics |
/v1/analytics/slow-queries | GET | Top slow queries |
/v1/analytics/failed-queries | GET | Recent failed queries |
/v1/analytics/patterns | GET | Frequent query patterns |
/v1/analytics/resources | GET | Resource consumption metrics |
/v1/analytics/time-series | GET | Time series data for visualization |
/v1/analytics/insights/{id}/acknowledge | POST | Acknowledge an insight |
Subsections
| Page | Description |
|---|---|
| Performance Trends | queryCount, avgLatency, successRate, cacheHitRate trends |
| Insights | Actionable insights generation and acknowledgment |
| Slow Queries | Top slow queries with optimization suggestions |
| Query Patterns | Frequent query patterns and clustering |
| Resource Consumption | CPU, memory, I/O metrics per query |
| Engine Statistics | Per-engine query statistics (Trino, ClickHouse, Spark) |
| User Statistics | Per-user query statistics |
| Time Series | Time series data for dashboard visualization |
| Period Comparison | Comparing performance between two time periods |