Force update of stored calculations

I have a MySQL database table of 2.4 million records. I have created 5 calculations, and have tried issuing the following to force the calculations to be stored:

for(var i=1; i<= controller.getMaxRecordIndex(); i++)
{
controller.setSelectedIndex(i);
}

This works fine up until around the 98,000th record, and then it just stops. I have tried sorting the file into descending sequence, but get the same results.
How can I force Servoy to store the calculations in al the records?

Hi Clive,

Not sure why you are bombing out after 98,000+ records - possibly the result of memory leak or a cache issue ?

The loop is the accepted way to go but maybe with this volume of records you would be better served and certainly quicker running an ‘UPDATE’ statement direct to the MySQL database !?

Cheers
Harry

do you do that in the developer?
Then give the developer more memory
the bat file could be something like this:

java -Xmx256M -jar servoy_developer.jar

then you give the developer max 256MB memory.

Johan, is there an easier way to update a calculation?
If not, is there a way to build this in Servoy, so that this goes faster?

not yet. We will add this functionality in a next major release

ok, great, would be a great feature!