Local DB Composite Index

Note: this component is designated "advanced", which means that objects of this type are not expected to be created or altered in most environments. If you believe that such a change is necessary, you may want to contact support in order to understand the potential impact of that change.

Local DB Composite Indexes may be used to define an index based on a filter pattern and an optional base DN pattern.

At the present time, the server's composite index support largely overlaps with what is already available in the form of an attribute index. However, there may be a couple of advantages to using a composite index over an equality, ordering, or substring attribute index:

Relations to This Component Properties dsconfig Usage

Relations to This Component

The following components have a direct composition relation to Local DB Composite Indexes:

Properties

The properties supported by this managed object are as follows:


Basic Properties: Advanced Properties:
 description  prime-index
 index-filter-pattern  prime-internal-nodes-only
 index-base-dn-pattern  cache-mode
 index-entry-limit

Basic Properties

description

Description
A description for this Local DB Composite Index
Default Value
None
Allowed Values
A string
Multi-Valued
No
Required
No
Admin Action Required
None. Modification requires no further action

index-filter-pattern (Read-Only)

Description
A filter pattern that identifies which entries to include in the index. The set of supported filter patterns may expand in the future, but at the present time, only the following patterns are supported:
  • (attributeName=?) -- This will cause all unique values for the specified attribute to be indexed for equality. This will be used to process searches with equality filter components that target the specified attribute, like "(givenName=John)", ordering components that target the specified attribute, like "(givenName>=Z)", or substring components with a subInitial (starts with) element that targets the specified attribute, like "(givenName=John*)". Substring filter components can also have subAny (contains) and subFinal (ends with) elements, but a subInitial element is required for it to use a composite index with this type of filter.
  • (attributeName=*?*) -- This will cause all unique values for the specified attribute to be indexed for substring filters. This will be used to process searches with substring filter components that target the specified attribute, like "(cn=*Donald*)" or "(sn=*son)". The server can use a composite index with this filter pattern to process any substring filter, but the server may prefer to process filters with subInitial (starts with) elements with an available equality index for the attribute type if one is available.
  • (&(attributeName1=?)(attributeName2=?)) -- An AND filter pattern may be specified with one or more wildcard equality filters followed by at most one wildcard substring filter. Each filter must specify a different attribute type. This will cause entries with at least one value for each attribute to be indexed for AND filters containing all but the last of those attribute types in equality filters and containing the last attribute type in an appropriate filter for the wildcard filter. See the simple filter pattern descriptions for which types of filters are appropriate for the last attribute type. For example, a composite index with filter pattern "(&(tenantID=?)(sn=?))" will be used to process AND filters containing a 'tenantID' equality filter and either an 'sn' equality filter, an 'sn' ordering filter, or an 'sn' substring filter with a subInitial (starts with) element.

Default Value
None
Allowed Values
A valid LDAP search filter
Multi-Valued
No
Required
Yes
Admin Action Required
None. Modification requires no further action

index-base-dn-pattern (Read-Only)

Description
An optional base DN pattern that identifies portions of the DIT in which entries to index may exist. If present, the value should be a DN, and only entries whose DNs match or are subordinate to the specified DN will be included in the index. However, the DN may actually be a pattern in which the attribute value of any single-valued RDN component may be replaced by a question mark. The question mark will be treated as a wildcard that will match any value for that component, and in that case, each unique DN that matches the pattern will be indexed separately so that whenever the server receives a search request with a base that is at or below a DN that matches this pattern, the index candidate set for that search will only include entries within that portion of the DIT. For example, if the DN pattern is "ou=?,ou=Customers,dc=example,dc=com", and a search is received with a base DN of "ou=CompanyX,ou=Customers,dc=example,dc=com", then the candidate entries retrieved from the index will only include the IDs of entries within the "ou=CompanyX,ou=Customers,dc=example,dc=com" subtree.
Default Value
None
Allowed Values
A valid DN.
Multi-Valued
No
Required
No
Admin Action Required
None. Modification requires no further action

index-entry-limit

Description
The maximum number of entries that any single index key will be allowed to match before the server stops maintaining the ID set for that index key. When evaluating a search filter component, if the server encounters an index key that has exceeded the index entry limit, the server will consider that filter component to be unindexed. If the filter component is part of an AND filter with one or more other components, then the server may still be able to use indexes for those other components to process the search efficiently. If the filter is comprised of only this filter component, or if the filter component is part of an OR component, then the search filter will likely be unindexed, although the server may still be able to leverage indexes to process the search somewhat efficiently based on the scope of the search.
If you raise the index entry limit, then that new limit will take effect immediately for any index keys that have not already exceeded the limit. If there are keys that have already exceeded an earlier limit but would not exceed the new limit, then you will need to rebuild the index for the new limit to be recognized for those keys.
If you lower the index entry limit, then that new limit will take effect immediately for any subsequent writes to the index. If there are existing keys that did not exceed the former limit but that do exceed the new limit, then those keys will be marked as exceeding the index the next time the server processes a change involving that index key, but until that happens, the ID set for the key will be considered valid and searches will be able to make use of it.
The index entry limit is a good thing. It can help ensure that the server does not maintain ID sets for index keys that match such a large percentage of entries in the server that it would be more efficient to treat the search as unindexed and cursor through all of the entries in the database than to first retrieve the complete ID set and then retrieve each entry individually. However, because of the way that composite indexes are designed, and in particularly because of their ability to break large ID sets into multiple pages, the cost of maintaining and using a very large ID set is much smaller in a composite index than in an attribute index. As such, large index entry limits are more acceptable for use with composite indexes than other types of indexes, but you may still wish to contact Ping Identity support personnel to discuss the design if you believe that you need a very large index entry limit.
Default Value
100000
Allowed Values
An integer value. Lower limit is 0.
Multi-Valued
No
Required
No
Admin Action Required
If you raise the index entry limit, then that new limit will take effect immediately for any index keys that have not already exceeded the limit. If there are keys that have already exceeded an earlier limit but would not exceed the new limit, then you will need to rebuild the index for the new limit to be recognized for those keys.


Advanced Properties

prime-index (Advanced Property)

Description
Indicates whether the server should load the contents of this index into memory when the backend is being opened. This property will only be considered if the backend's prime-method property has at least one value other than "none". If the prime-method property does not have any values, or if its only value is "none", then priming will not be performed for any database in the backend.
In addition, this property will only be considered if the backend's prime-all-indexes configuration property is set to false. If the prime-all-indexes property is set to true, then all databases in the backend will be loaded into memory, regardless of the value of the prime-index property in any given index. If the prime-all-indexes property is set to false, then only indexes that have a prime-index value of true will be primed.
Enabling priming for an index will increase the time required to open the backend, but the server will exhibit better initial performance when accessing that index. If an index is not primed, then access to the index will require disk I/O for any data not already held in memory, and accessing data on disk can be substantially slower than retrieving it from memory.
Default Value
false
Allowed Values
true
false
Multi-Valued
No
Required
No
Admin Action Required
None. Modification requires no further action

prime-internal-nodes-only (Advanced Property)

Description
Indicates whether to only prime the internal nodes of the index database, rather than priming both internal and leaf nodes. The internal nodes of an index database contain the B-tree structure and keys for that database, while the leaf nodes contain the data associated with those keys. Priming only internal nodes should be faster and consume less memory than priming both internal and leaf nodes, but will result in lower initial performance because it will be necessary to go to disk to retrieve the data from leaf nodes that are not yet in the cache.
This property is only relevant if the backend is configured with a prime-method of preload. If the backend is configured with a prime-method of preload-internal-nodes-only, then the server will only prime internal nodes even if this setting is false. This setting is not relevant for other prime-method values like cursor-across-indexes, prime-to-filesystem-cache or prime-to-filesystem-cache-non-sequential.
Default Value
false
Allowed Values
true
false
Multi-Valued
No
Required
No
Admin Action Required
None. Modification requires no further action

cache-mode (Advanced Property)

Description
The behavior that the server should exhibit when storing information from this index in the database cache.
Default Value
The backend's default-cache-mode setting will be used.
Allowed Values
cache-keys-and-values - Indicates that the server should attempt to keep all data (index keys and their corresponding ID sets) in the database cache.

cache-keys-only - Indicates that the server should attempt to keep index keys in the database cache, but that it should not cache the associated ID sets. This can be used to reduce the amount of memory that the server needs to operate, or to prioritize the available memory for caching other databases. It will result in lower performance than the cache-keys-and-values mode because it will be necessary to go to disk to retrieve ID sets from this index.

no-caching - Indicates that the server should attempt to cache as little information as possible from this index. Only a minimal amount of the database structure may be cached, and retrieving any information from the index will require disk access. Note that this setting may tax the JVM's garbage collector more heavily than other cache modes.
Multi-Valued
No
Required
No
Admin Action Required
None. Modification requires no further action


dsconfig Usage

To list the configured Local DB Composite Indexes:

dsconfig list-local-db-composite-indexes
     [--property {propertyName}] ...

To view the configuration for an existing Local DB Composite Index:

dsconfig get-local-db-composite-index-prop
     --index-name {name}
     --backend-name {name}
     [--tab-delimited]
     [--script-friendly]
     [--property {propertyName}] ...

To update the configuration for an existing Local DB Composite Index:

dsconfig set-local-db-composite-index-prop
     --index-name {name}
     --backend-name {name}
     (--set|--add|--remove) {propertyName}:{propertyValue}
     [(--set|--add|--remove) {propertyName}:{propertyValue}] ...

To create a new Local DB Composite Index:

dsconfig create-local-db-composite-index
     --index-name {name}
     --backend-name {name}
     --set index-filter-pattern:{propertyValue}
     [--set {propertyName}:{propertyValue}] ...

To delete an existing Local DB Composite Index:

dsconfig delete-local-db-composite-index
     --index-name {name}
     --backend-name {name}