I am considering increasing parameters such as query.max-history to extend the duration that a query is displayed in the Trino web UI. However, due to the huge number of queries issued by users, the memory needed to keep them for a sufficient period of time would be huge.
Is there any solution to this problem?
Answer: You can use an event listener to send query details to some other data store if you need historical visibility. Older queries won’t show in the UI anymore, but if you need to persist that data it’s a great option. There’s a built in MySQL listener in the repo and it’s pretty easy to swap it to Postgres. If you output the logs to any db, you can create your own log viewing solution pretty easily. Then you can sync with Grafana or even Power BI for a direct query-style report.