Best practice: Database Manager versus controller object

I am doing some work involving transactions between Servoy managed tables. I would prefer to do this in the Servoy app layer instead of within db code (stored proc etc).

If I am moving data from TableA to TableB within a method, is it best (from a performance standpoint especially) to:

  1. Use available methods within the Database Manager node
  2. Use the form.controller object

In option 2, I will not have the form visible (I will only be referencing the form.controller from a global method) - so I will not be doing a bunch of screen refreshes as I know this will incur overhead.

My main concern is to do with performance.

Thanks, Michael

Whatever you do in Servoy will simply be translated in sql queries so basically there’s no difference between running your own queries or letting servoy do it for you.
The only thing to keep in mind is that using the controller means that the records you are processing need to be loaded into memory and displayed to screen while using the foundset object doesn’t imply screen redraws and loads record only when needed.
To make it easy: use the foundset whenever possible and always use it for loops, use the controller when you need to touch things that are displayed on scren.
The best example is a loop for duplicating some records, try do it on the controller and on the foundset and notice the differnce.

Thanks, Nicola - I will try the foundset instead and compare execution time over the controller object. Best, Michael