---
title: Managing local DB indexes
description: To modify the local database (DB) indexes to meet your system's requirements, use the dsconfig tool. If you are using the dsconfig tool in interactive command-line mode, access the Local DB Index menu from the Basic object menu.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_manage_local_db_indexes
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_manage_local_db_indexes.html
revdate: September 13, 2023
page_aliases: ["pd_ds_view_list_local_db_indexes.adoc", "pd_ds_view_property_all_local_db_indexes.adoc", "pd_ds_view_config_params_local_db_index.adoc", "pd_ds_modify_config_local_db_index.adoc", "pd_ds_create_new_local_db_index.adoc", "pd_ds_delete_local_db_index.adoc"]
section_ids:
  viewing-the-list-of-local-db-indexes: Viewing the list of local DB indexes
  steps: Steps
  example: Example:
  result: Result:
  viewing-a-property-for-all-local-db-indexes: Viewing a property for all local DB indexes
  steps-2: Steps
  example-2: Example:
  viewing-the-configuration-parameters-for-local-db-index: Viewing the configuration parameters for local DB index
  steps-3: Steps
  example-3: Example:
  modifying-the-configuration-of-a-local-db-index: Modifying the configuration of a local DB index
  about-this-task: About this task
  steps-4: Steps
  example-4: Example:
  example-5: Example:
  example-6: Example:
  example-7: Example:
  example-8: Example:
  creating-a-new-local-db-index: Creating a new local DB index
  steps-5: Steps
  example-9: Example:
  example-10: Example:
  example-11: Example:
  example-12: Example:
  example-13: Example:
  deleting-a-local-db-index: Deleting a local DB index
  about-this-task-2: About this task
  steps-6: Steps
  example-14: Example:
---

# Managing local DB indexes

To modify the local database (DB) indexes to meet your system's requirements, use the `dsconfig` tool. If you are using the `dsconfig` tool in interactive command-line mode, access the **Local DB Index** menu from the **Basic object** menu.

## Viewing the list of local DB indexes

### Steps

* To view the default list of indexes, run `dsconfig` with the `list-local-db-indexes` option.

  #### Example:

  ```shell
  $ bin/dsconfig list-local-db-indexes --backend-name userRoot
  ```

  #### Result:

  ```
  Local DB Index     : Type    : index-type
  -------------------:---------:--------------------
  aci                : generic : presence
  cn                 : generic : equality, substring
  ds-entry-unique-id : generic : equality
  givenName          : generic : equality, substring
  mail               : generic : equality
  member             : generic : equality
  objectClass        : generic : equality
  sn                 : generic : equality, substring
  telephoneNumber    : generic : equality
  uid                : generic : equality
  uniqueMember       : generic : equality
  ```

## Viewing a property for all local DB indexes

### Steps

* To view a property assigned set for all local DB indexes, run `dsconfig` with the `--property` option.

  Repeat the option for each property that you want to list.

  #### Example:

  In this example, the `prime-index` property specifies if the backend is configured to prime the index at startup.

  ```shell
  $ bin/dsconfig list-local-db-indexes --property index-entry-limit \
    --property prime-index --backend-name userRoot
  ```

## Viewing the configuration parameters for local DB index

### Steps

* To view the configuration setting of a local DB index, run `dsconfig` with the `get-local-db-index-prop` option and the `--index-name` and `--backend-name` properties.

  |   |                                                                               |
  | - | ----------------------------------------------------------------------------- |
  |   | To view the advanced properties, add the `--advanced` option to your command. |

  #### Example:

  ```shell
  $ bin/dsconfig get-local-db-index-prop --index-name aci \
    --backend-name userRoot
  ```

## Modifying the configuration of a local DB index

### About this task

To modify an index, run the `dsconfig` tool. Any modification or addition of an index requires rebuilding the indexes. In general, an index only needs to be built once after it has been added to the configuration.

|   |                                                                                                                                                                                                                                               |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | If you add an index and then import the data using the `import-ldif` tool, the index is automatically rebuilt. If you add an index and then add the data using a different method, you must rebuild the index using the `rebuild-index` tool. |

### Steps

1. To modify an index, run `dsconfig` with the `set-local-db-index-prop` option and the `--index-name` and `--backend-name` properties.

   #### Example:

   This example updates the `prime-index` property, which loads the index at startup. To access this command, use the `--advanced` option.

   ```shell
   $ bin/dsconfig set-local-db-index-prop --index-name uid \
     --backend-name userRoot --set prime-index:true
   ```

2. To view the index and verify the change, run `dsconfig` with the `get-local-db-index-prop` option.

   #### Example:

   ```shell
   $ bin/dsconfig get-local-db-index-prop --index-name uid \
     --backend-name userRoot
   ```

3. Stop the server.

   |   |                                                                                  |
   | - | -------------------------------------------------------------------------------- |
   |   | Although you can rebuild an index with the server online, it is not recommended. |

   #### Example:

   ```shell
   $ bin/stop-server
   ```

4. To rebuild the index, run the `rebuild-index` tool.

   #### Example:

   ```shell
   $ bin/rebuild-index --baseDN dc=example,dc=com --index uid
   ```

5. Restart the server.

   #### Example:

   ```shell
   $ bin/start-server
   ```

## Creating a new local DB index

### Steps

1. To create a new local DB index, run `dsconfig` with the `--create-local-db-index` option and the `--index-name`, `--backend-name`, and `--set index-type:`*\<value>* options.

   #### Example:

   ```shell
   $ bin/dsconfig create-local-db-index \
     --index-name roomNumber --backend-name userRoot \
     --set index-type:equality
   ```

2. To view the index, run `dsconfig` with the `get-local-db-index-prop` option.

   #### Example:

   ```shell
   $ bin/dsconfig get-local-db-index-prop \
     --index-name roomNumber --backend-name userRoot
   ```

3. Stop the PingDirectory server.

   |   |                                                                                  |
   | - | -------------------------------------------------------------------------------- |
   |   | Although you can rebuild an index with the server online, it is not recommended. |

   #### Example:

   ```shell
   $ bin/stop-server
   ```

4. To rebuild the index, run the `rebuild-index` tool.

   #### Example:

   ```shell
   $ bin/rebuild-index --baseDN dc=example,dc=com --index roomNumber
   ```

5. Restart the PingDirectory server.

   #### Example:

   ```shell
   $ bin/start-server
   ```

## Deleting a local DB index

### About this task

Check that no plugin applications are using the index before deleting it.

|   |                                                                                                                                           |
| - | ----------------------------------------------------------------------------------------------------------------------------------------- |
|   | When the index is deleted, the corresponding index database is also deleted. The disk space is reclaimed after the cleaner threads begin. |

### Steps

* To remove an index from the database, run `dsconfig` with the `delete-local-db-index` option.

  #### Example:

  ```shell
  $ bin/dsconfig delete-local-db-index \
    --index-name roomNumber --backend-name userRoot
  ```
