Database locks in regard to new objects with an Autonumber attribute

We have a process that we need to optimize in order to achieve i am thinking of splitting up the process in multiple subprocesses that can be run simultaneously. In one (quick-dirty) attemp to achieve this we encountered a lot of deadlocks because the processes had the same database interaction. To prevent these deadlocks from happening i would need to know a bit more on how Mendix applies locking on the database. e.g. When you create a new object does that lock the whole table or just the row? And if it only locks the row, how does Mendix handle Autonumbers? How are delete's handled and how does this all work when using inheritance?   Edit: I created a ticket to get this question answered and got the following response: "The locking mechanism depends on the database server as locks are executed on that level. But in general the only relevant lock in a Mendix application is the following one:  - a record is locked when multiple users can potentially make changes to it simultaneously so this means whenever an edit takes place (i.e. an update / change of an entity). Since Mendix works with transactions and microflow are the representation of a single transaction (start event in a microflow = start of transaction, end event in the same microflow = end of transaction) you can consider an entity (=row) locked as soon as you commit a changed object within a microflow, for as long as the microflow is running (i.e. until the end event is reached). AutoNumber is created on a "create" and not changed in an update so it should not be vulnerable to this type of locking."
0 answers