Going through the question, I believe that the error has occurred, when the executing query consumes more memory than the configured memory limit.
Generally, estimating memory usage for a particular query depends on the operations being performed, number of rows retrieved, etc.
In scenarios like this, to avoid such errors , I would set a memory limit which can be used by the query. For this, I would open the Memory usage tab by navigating to Administration > Server Configuration of Virtual DataPort Administration Tool for increasing the value of “**Maximum query size (MB)**” parameter and execute the view again.
You can refer to the [Configuring the Memory Usage and Swapping Policy](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/server_administration_-_configuring_the_server/configuring_the_memory_usage_and_swapping_policy/configuring_the_memory_usage_and_swapping_policy#configuring-the-memory-usage-and-swapping-policy) section and[ Limit the Maximum Amount of Memory of a Query](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/memory_management/limit_the_maximum_amount_of_memory_of_a_query/limit_the_maximum_amount_of_memory_of_a_query) section under the Virtual DataPort Administration Guide for more information on configuring the memory usage.
Hope this helps !