You are here: Tuning > Performance Hints > Inheritance Hierarchies

Inheritance hierarchies

Do not create inheritance hierarchies, if you don't need them.

Advantage

Avoiding inheritance hierarchies will help you to get better performance as only actual classes will be kept in the class index and in the database.

Effect

Every class in the hierarchy requires db4o to maintain a class index. It is also true for abstract classes and interfaces since db4o has to be able to run a query against them.

Alternate strategies

Class hierarchies and interfaces may be valuable for your application design. You can also use interface/superclass to query for implementations/subclasses.