major
minor
major
minor
If multiple objects of the same type are deleted (i.e., objects that are in the same database table), a batch is created for the database, and the command "Update the row where the ID is XXX and REV.MAX=infinity" is added for each element.
This appears to be extremely inefficient in Oracle.
Deleting 15,000 elements (i.e., updating 15,000 rows) takes about 40 seconds; if there are additional elements in the table that are not affected, this becomes many times slower (with approximately 90,000 rows, updating 15,000 rows takes about 1 minute and 50 seconds). (Measured on a local Oracle 12 instance in Docker)
Improvement
Instead of adding a batch for each element, a bulk query is executed: “Update the rows where REV_MAX = infinity and the ID is in the set {X1, X2, X3, ...}”
With this approach, updating 15,000 elements out of a total of 90,000 rows takes approximately 1 second.
Test
No test. Everything must continue to function properly.