Harsh Gupta
08/05/2026, 9:46 PMRocky
08/05/2026, 9:46 PMstarrocks_fe_query_latency_ms) are typically exposed at the cluster or resource group level.
However, you can obtain table-level performance data or derive query latency through the following methods:
1. Audit Logs (Recommended for Latency)
The most common way to track latency per table is by using the AuditLoader plugin to import fe.audit.log into a StarRocks table (usually starrocks_audit_db*.starrocks_audit_tbl*).
* Metric available: queryTime (in milliseconds).
* Granularity: Each record includes the SQL statement (stmt), user, and database.
* Usage: You can run SQL queries against this audit table to aggregate average or P95 latency. Since a single query can join multiple tables, StarRocks doesn't always map a query to a "single" table automatically in the logs, but you can filter or parse the stmt field to attribute latency to specific tables.
2. Table-level Metrics via /metrics
You can enable detailed table metrics by adding the with_table_metrics=all parameter to the FE metrics endpoint:
http://<FE_IP>:<FE_HTTP_PORT>/metrics?with_table_metrics=all
* What it provides: This exposes table-level throughput and resource usage (e.g., table_scan_rows, table_scan_bytes, table_load_rows).
* Limitation: It does not currently include a specific "query latency" histogram for each table, as latency is measured at the query execution level, not the individual table level.
3. Resource Groups
If you need to monitor latency for a specific set of tables used by a particular business line, you can isolate those queries into a Resource Group. StarRocks provides Prometheus metrics for latency per resource group:
* starrocks_fe_query_resource_group_latency (Histogram/Percentiles)
Summary Table
Method | Metrics Provided | Granularity | Recommended For
Prometheus | Throughput (Scan/Load) | Table-level | Capacity planning, finding "hot" tables
Audit Logs | Latency (queryTime) | Query-level | Analyzing actual query performance per table
Resource Groups | Latency | Group-level | SLA monitoring for specific workloads
To enable table-level metric collection in your FE configuration, ensure enable_table_metrics_collect = true (which is the default).
References
• administration/management/monitoring/metrics.md
• administration/management/FE_configuration.md