Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

C#
Visual Basic
Visual C++

Berkeley DB .NET API Documentation
SecondaryDatabaseConfig..::.ImmutableKey Field
SecondaryDatabaseConfig Class See Also

If true, the secondary key is immutable.

Namespace: BerkeleyDB
Assembly: libdb_dotnet48 (in libdb_dotnet48.dll) Version: 4.8.24.0

# Syntax

C#
    public bool ImmutableKey

Visual Basic (Declaration)
    Public ImmutableKey As Boolean

Visual C++
    public:
    bool ImmutableKey

# Remarks

This setting can be used to optimize updates when the secondary key in a primary record will never be changed after the primary record is inserted. For immutable secondary keys, a best effort is made to avoid calling the secondary callback function when primary records are updated. This optimization may reduce the overhead of update operations significantly if the callback function is expensive.

Be sure to specify this setting only if the secondary key in the primary record is never changed. If this rule is violated, the secondary index will become corrupted, that is, it will become out of sync with the primary.

# See Also

SecondaryDatabaseConfig Class
BerkeleyDB Namespace