I tried running an SQL query on my SQLworkbench on my Ubuntu OS
SELECT *,d.dept_name,
MAX(salary)
OVER(
PARTITION BY d.dept_name
) AS "SAL"
FROM salaries
JOIN dept_emp AS de USING(emp_no)
JOIN departments AS d USING(dept_no)
It was running when I suddenly got a pop up message sql workbench the system is running low on memory. to prevent data corruption the current operation has been aborted. please increase the heap size with the -xmx parameter.
I went through some similar post on Stackoverflow and I found this one Increase heap size for sqlworkbench/J
It mentioned running a command java -Xmx4g -jar sqlworkbench.jar
which I did but when I do that it runs a completely new instance of my Workbench as if I am freshly installing it. Please help I will be doing a lot of PARTITION BY
queries but I am hindered by this issue.. I checked the free memory and it is 1924MB/1966MB.
Also when the above pop-up message shows, besides my memory usage spiking up whilst running the query before finally giving that pop-up message... the query timer still keeps counting and my memory usage is as it is as if the query is running, and the option to cancel execution is not available, unless I finally close the SQLworkbench then my system memory usage comes back to normal.
Please help I have an 64bit system with 8GB RAM
The relevant part of
sqlworkbench.sh
are these lines:Just add the
-Xmx
paramter where you want, e.g: