You are here: Tuning > Performance Hints > No Class Index

No Class Index

IEmbeddedConfiguration configuration = Db4oEmbedded.NewConfiguration();
configuration.Common.ObjectClass(typeof (Person)).Indexed(false);
ObjectConfigurationExamples.cs: Disable class index
Dim configuration As IEmbeddedConfiguration = Db4oEmbedded.NewConfiguration()
configuration.Common.ObjectClass(GetType(Person)).Indexed(False)
ObjectConfigurationExamples.vb: Disable class index

Advantage

Allows to improve the performance to delete and create objects of a class.

Effect

db4o maintains an index for each class to be able to deliver all instances of a class in a query. In some cases class index is not necessary:

Indexed(false) setting will save resources on maintaining the class index on create and delete of the class objects.

Alternate Strategies

Object creation performance can be improved using configuration.callConstructors(true) setting.