<@U0A71G31CDV> How can i get the query execution l...
# questions-and-troubleshooting
r
@Rocky How can i get the query execution log for more than 100 item in celerdata starrocks instance?
r
To get more than 100 query execution log items (or profiles) in your StarRocks instance, you have several options depending on whether you want to see them in the UI, query them via SQL, or access the raw files. By default, StarRocks limits the number of "recent" query details and profiles kept in the Frontend (FE) memory to 100 to save resources. 1. Increase the In-Memory Cache (FE Configuration) If you want to see more items in the "Query History" or "Query Profile" list in the StarRocks Manager/Console or via the HTTP API, you can increase the following FE configuration parameters: *
qe_max_finished_profile_num
: Controls how many query profiles are kept in memory (default is 100). *
query_detail_cache_size
: Controls how many query detail records (the list you see in the UI) are cached in memory (default is 100). How to change: In CelerData, you can typically modify these in the Configuration or Parameters tab of your cluster in the console. If you have access to the SQL interface, you can check them via:
Copy code
sql
ADMIN SHOW FRONTEND CONFIG LIKE "%query_detail_cache_size%";
ADMIN SHOW FRONTEND CONFIG LIKE "%qe_max_finished_profile_num%";
Note: These usually require a restart of the FE if modified in the
fe.conf
file, but some versions allow dynamic adjustment via
ADMIN SET FRONTEND CONFIG
.
────────── 2. Use the AuditLoader Plugin (Recommended for SQL Access) The best way to handle large volumes of query logs (thousands or millions) is to use the AuditLoader plugin. It automatically syncs the logs from the file system into a StarRocks table, allowing you to query them using standard SQL. 1. Install AuditLoader: This plugin reads
fe.audit.log
and loads it into a table. 2. Query the table: Once installed, you can query all historical logs (limited only by your retention settings) using:
Copy code
sql
    SELECT * FROM starrocks_audit_db*.starrocks_audit_tbl*
    ORDER BY timestamp DESC
    LIMIT 1000;
────────── 3. Access Raw Audit Logs (Filesystem) Every query is recorded in the
fe.audit.log
file on the FE node. This file contains the complete history, rotated based on your configuration. * Location:
fe/log/fe.audit.log
* Configuration: * `audit_log_roll_num`: Number of log files to keep (default 90). * `audit_log_delete_age`: How long to keep logs (default 7 days). ────────── 4. CelerData Specifics In the CelerData Cloud/Managed environment: * Query History UI: The console often has filters (Time Range, User, Query ID). If you are looking for a specific query older than the last 100, try using the Time Range filter to narrow down the results, as the 100-item limit often applies to the initial view. * Retention: If you need to audit queries over months, ensure AuditLoader is enabled or that you are exporting logs to an external sink (like S3 or CloudWatch) if supported by your specific CelerData deployment. Summary of what to do now: If you just need to see 500 recent queries in the UI, try setting
query_detail_cache_size = 500
in your FE configuration. If you need a permanent searchable history, set up AuditLoader. Referencesadministration/management/audit_loader.mdadministration/management/logs.mdfaq/operation_maintenance_faq.mdadministration/management/FE_configuration.mdknowledge/usage/best-practice.md