Avoid SQL loops in a multi-engine environment

In a multi-engine environment, certain Java/SQL commands can negatively affect performance. This typically happens when the same Java method executes multiple times within a SQL loop. To avoid this, write Java/SQL commands so that the method and the loop are executed in the VM context:

  1. Write loop in Java.

  2. Call method from Java-coded loop.