<xml> </xml>

db4o |

# ObjectField.Indexed Method

turns indexing on or off.

void Indexed(
bool flag
);

#### Parameters

flag
  specify

      true

  or

      false

  to turn indexing on for this field

#### Remarks

turns indexing on or off.
Field indices dramatically improve query performance but they may considerably reduce storage and update performance.
The best benchmark whether or not an index on a field achieves the desired result is the completed application - with a data load that is typical for it's use.
This configuration setting is only checked when the com.db4o.ObjectContainer is opened. If the setting is set to

    true

and an index does not exist, the index will be created. If the setting is set to

    false

and an index does exist the index will be dropped.

#### See Also

ObjectField Interface | com.db4o.config Namespace