Zurab Kiknavelidze
10/05/2026, 1:18 PMRocky
10/05/2026, 1:19 PMstatistic_auto_collect_large_table_interval.
Additionally, for the newer query-triggered analyze feature (v3.4.0+), the corresponding parameter is connector_table_query_trigger_analyze_large_table_interval.
Key Parameters
* statistic_auto_collect_large_table_interval:
* Default: 43200 (12 hours).
* Description: This FE configuration item defines the interval for automatically collecting statistics for large tables. For Hive and Iceberg tables, StarRocks checks if data has changed. If an update is detected, it only triggers a new ANALYZE job if the time since the last statistics update exceeds this interval.
* To set this to 7 days, you would use: 604800 (seconds).
* connector_table_query_trigger_analyze_large_table_interval (v3.4+):
* Default: 43200 (12 hours).
* Description: Specifically for external catalogs (Hive, Iceberg, Hudi, Delta Lake), this parameter controls how often a query can trigger a background ANALYZE task for a large table's columns.
* statistic_auto_collect_small_table_rows:
* Default: 10,000,000.
* Description: Determines the threshold for what StarRocks considers a "large table." Tables with row counts above this value follow the "large table" interval.
How it works
1. Change Detection: For external tables like Hive and Iceberg, StarRocks periodically (every statistic_collect_interval_sec, default 5 mins) checks for metadata changes (e.g., transient_lastDdlTime in Hive).
2. Interval Guard: Even if data has changed, the system will not trigger a new analyze job unless Last Update Time + Collection Interval < Current Time. This prevents expensive ANALYZE tasks from running too frequently on large external datasets.
3. Manual Override: When creating an automatic collection task via CREATE ANALYZE TABLE, you can also specify the property "statistic_auto_collect_interval" = "604800" to enforce a 7-day update cycle for that specific table.
Configuration
You can check or set these via the following SQL commands:
sql
-- Check current configuration
ADMIN SHOW CONFIG LIKE '%interval%';
-- Update configuration (e.g., set to 7 days)
ADMIN SET FRONTEND CONFIG ("statistic_auto_collect_large_table_interval" = "604800");
ADMIN SET FRONTEND CONFIG ("connector_table_query_trigger_analyze_large_table_interval" = "604800");
If you are looking for a parameter that defaults to 7 days, note that while sys_log_delete_age defaults to 7d, the statistics intervals usually default to 12 hours. You likely want to modify the intervals mentioned above to achieve your 7-day requirement.
References
• using_starrocks/Cost_based_optimizer.md
• sql-reference/information_schema/statistics.md
• knowledge/usage/best-practice.md