Github user JamesRTaylor commented on the pull request: https://github.com/apache/phoenix/commit/48e589773cbf46a10a2c1bd5cf483f2390ae1160#commitcomment-16855409 When a group by is being performed, unless the group by key is made up of the leading PK columns of a table or index, Phoenix holds in memory each distinct group by key and the partial aggregation. This will spill to disk based on phoenix.groupby.maxCacheSize, but performance will drop in this case. There may be other in memory representations we can use to reduce the memory footprint. I've filed PHOENIX-2800 for some potential future work. Let me know if you'd be interested in contributing that.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---