You are here: Tuning > Main Operations Performance > Delete Performance > Complexity Of Objects

Complexity Of Objects

Unlike other database operations deletion is mostly unaffected by the complexity of objects. The delete operation basically marks an object as deleted and is the same for any type of object. The main time required is to locate the object record in the database. This is demonstrated by the following example:

The following classes are used for the test:

The deletion procedure deletes several items from the whole amount of objects in the database:

Approximate results on the test computer are presented below:

Delete test with different objects

Deleting 1 of 10000 objects with 3 levels of embedded objects:

You can see that the complexity and structure of an object play little or no role in the performance.

Download example code:

c#