performance options

this is just an example using ‘0’, most of the time, I would refer to another foundset or a related record to get the value, or worst, calculate it from its content, ie if this field contains “ABC” and this other contains BCD in the current foundset, then update this second field with 2.
And i got this example from the dev ref doc, p474, 1st example using “next”.

I can imagine that if you make a loop, it will create an update statement for each iteration (which is 70K of update statements)
So in that case I would not use a FoundsetUpdater, but a normal foundset, or maybe even better, try to use rawSQL if you know a better query to update your database

If you look 7 posts up then you see I already stated that the foundsetUpdater won’t do Lesouef much good and that the pure SQL approach (see linked thread) already the most efficient option is.

ROCLASI:
If you look 7 posts up then you see I already stated that the foundsetUpdater won’t do Lesouef much good and that the pure SQL approach (see linked thread) already the most efficient option is.

Hi Robert,

I can’t find that Lesouef tried it with table tracking off. If table tracking is on you’ll always will get individual updates…
Has anyone seen/tested what happens in SQL when using foundsetUpdater.next() and afterwards performUpdate() ?

Hi Lambert,

lwjwillemsen:

ROCLASI:
If you look 7 posts up then you see I already stated that the foundsetUpdater won’t do Lesouef much good and that the pure SQL approach (see linked thread) already the most efficient option is.

Hi Robert,

I can’t find that Lesouef tried it with table tracking off. If table tracking is on you’ll always will get individual updates…

You mean this ? From the 3rd post under mine. (emphasis is mine)

lesouef:
tried the foundsetupdater with mode 1, table tracking is off, and result is still very poor. endless minutes…

Also he needs individual updates because he uses data from the same record to update other columns within that same record. The most efficient way to do this is with one SQL query and let the database server do it for you.

Also he needs individual updates because he uses data from the same record to update other columns within that same record.

If above is the case then there is not much to do within Servoy with regards to performance I think… Maybe a feature request for general foundSetUpdate(r) with other (related) fields ?

I have been using a SQL query in the end, but I hate to bypass the servoy controller. and this is lightning fast.