On 31 Oct, 09:22, josh <xdevel1...@xxxxxxxxx> wrote:
Hi, I have the following problem:
in a while loop I get from a db some records and in the same time
I put them with an insert preparedStatement in
a destination db but the jave process increase the memory until it
goes in out of memory.
How can I optimize that? also If I increase Tomcat java memory when I
process more than 500 records
tha java memory is already at 700mb of usage!
Please help
You can loop through the records (i.e. fetch them one-by-one), reuse
the same variables and run gc() after each (or few consecutive) loop
iterations.
Re: memory management ... I put them with an insert preparedStatement in ... a destination db but the jave process increase the memory until it ... also If I increase Tomcat java memory when I ... As far as I can tell, this will create huge strings with the complete result set, as they are declared outside the loop (actually twice the ... (comp.lang.java.programmer)
Re: memory management ... I put them with an insert preparedStatement in ... also If I increase Tomcat java memory when I ... as they are declared outside the loop (actually twice the ... the problem was not in the resultset but in my logging string!... (comp.lang.java.programmer)
Re: memory management ... in a while loop I get from a db some records and in the same time ... I put them with an insert preparedStatement in ... a destination db but the jave process increase the memory until it ... also If I increase Tomcat java memory when I ... (comp.lang.java.programmer)
Re: Question about graph theroy--Help! ... the source and destination may be the same node. ... if it has visited that node before (loop).... A data structure for a path would have: ... - fixed array of 254 bytes ... (comp.soft-sys.matlab)
Re: Best way to integrate all filenames in a directory with SQL Recordset? ... Actual filename value transform from old to new is more like Filename.1 -> ...mismatch lists if something goes wrong. ... I will see what I can do to add another loop mid-stream to catch all file ... > Your destination I can only presume has 4 attributes ... (microsoft.public.sqlserver.dts)