How can I adjust heap size (memory requirements) for my persistent queries?
See the Monitor query performance in the Troubleshooting Queries guide for a comprehensive overview of how to monitor and adjust heap size for your Persistent Queries.
The tables generated by the performance overview methods let you look at how much memory a query is using. If the query/worker is using only a small percentage of its max heap size, you should reclaim some of that memory for other queries. On the other hand, if a query is requiring almost all the memory allocated, you should increase the heap size to prevent underperformance or failure.
If you are investigating a specific query and have concerns about heap, we recommend turning on detailed GC logging in the Persistent Query Editor, under Advanced Options (enabled by default). You can also turn on detailed GC logging when you create a new console by selecting Advanced Options and selecting Enable detailed GC logging. This creates additional lines in the Process Event Log, which can be used to analyze performance or failures.