Depending on the size of the SELECT or INSERT operation, we can see an error if memory usage is high.
Code: 241. DB::Exception: Received from localhost:9000. DB::Exception: Memory limit (for query) exceeded
Is there a method to workaround way? Of course, this method is purely for debugging purposes only.
SET max_memory_usage = (value)
This issue may be resolved by raising the max_memory_usage parameter limit as needed. However, this workaround is provided for implementation in non-prod environments.
Important Note: These solutions do not reduce memory usage. So, it is recommended for only non-prod environments.
For production environments, reordering the data will greatly reduce RAM use to permanently fix SELECT operation faults.