---
title: Working with local DB VLV indexes
description: Local database (DB) virtual list view (VLV) indexes allow a client to request a subset of results from a sorted list that match a specific search base, scope, and filter.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_local_db_vlv_indexes
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_local_db_vlv_indexes.html
revdate: September 13, 2023
page_aliases: ["pd_ds_view_list_local_db_vlv_indexes.adoc", "pd_ds_create_local_db_vlv_index.adoc", "pd_ds_modify_vlv_index_config.adoc", "pd_ds_rebuild_vlv_index.adoc", "pd_ds_delete_vlv_index.adoc"]
section_ids:
  viewing-the-list-of-local-db-vlv-indexes: Viewing the list of local DB VLV indexes
  steps: Steps
  example: Example:
  creating-a-new-local-db-vlv-index: Creating a new local DB VLV index
  steps-2: Steps
  example-2: Example:
  example-3: Example:
  modifying-a-vlv-indexs-configuration: Modifying a VLV index's configuration
  steps-3: Steps
  example-4: Example:
  example-5: Example:
  rebuilding-a-vlv-index: Rebuilding a VLV index
  steps-4: Steps
  deleting-a-vlv-index: Deleting a VLV index
  about-this-task: About this task
  steps-5: Steps
  example-6: Example:
  example-7: Example:
---

# Working with local DB VLV indexes

Local database (DB) virtual list view (VLV) indexes allow a client to request a subset of results from a sorted list that match a specific search base, scope, and filter.

The client can navigate through the list by passing a context back to the server with the virtual list view control. The local DB VLV index can be used only when the client request contains the VLV control and the client has been authorized with an access control instruction (ACI) with a `targetcontrol` of 2.16.840.1.113730.3.4.9.

|   |                                                                                                                                                                                                                                                                       |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | A client request, which includes a virtual list view control, can be successfully processed without a matching local DB VLV index if the search is completely indexed. This is not an efficient means of using VLV since the server has to retrieve each entry twice. |

## Viewing the list of local DB VLV indexes

### Steps

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

  #### Example:

  In this example, no VLV indexes are defined.

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

## Creating a new local DB VLV index

### Steps

1. Use `dsconfig` with the `create-local-db-vlv-index` option and the `--index-name`, `--backend-name`, and `--set index-type:(propertyValue)` options.

   |   |                                                                         |
   | - | ----------------------------------------------------------------------- |
   |   | If you do not set any property values, the default values are assigned. |

   #### Example:

   ```shell
   $ bin/dsconfig create-local-db-vlv-index \
     --index-name givenName --backend-name userRoot --set base-dn:dc=example,dc=com \
     --set scope:whole-subtree --set filter:"(objectclass=*)" \
     --set sort-order:givenName
   ```

2. Rebuild the index using the `rebuild-index` tool.

   |   |                                                                            |
   | - | -------------------------------------------------------------------------- |
   |   | You must add the `vlv.` prefix to the index name to rebuild the VLV index. |

   #### Example:

   The following command can be run with the server on or offline with the addition of the `--task` and connection options.

   ```shell
   $ bin/rebuild-index --baseDN dc=example,dc=com --index vlv.givenName
   ```

## Modifying a VLV index's configuration

### Steps

1. Use `dsconfig` with the `set-local-db-vlv-index-prop` option and the `--index-name` and `--backend-name` properties.

   #### Example:

   In this example, update the `base-dn` property.

   ```shell
   $ bin/dsconfig set-local-db-vlv-index-prop --index-name givenName \
     --backend-name userRoot --set base-dn:ou=People,dc=example,dc=com
   ```

2. Rebuild the index using the `rebuild-index` tool.

   |   |                                                   |
   | - | ------------------------------------------------- |
   |   | You must add the prefix `vlv.` to the index name. |

   #### Example:

   The following command can be run with the server on or offline with the addition of the `--task` and connection options.

   ```shell
   $ bin/rebuild-index --baseDN dc=example,dc=com --index vlv.givenName
   ```

## Rebuilding a VLV index

When rebuilding specific non-attribute indexes, it is important to include any appropriate prefixes or postfixes with the index name to avoid errors.

### Steps

* When rebuilding a VLV index with the `rebuild-index` tool, the index name must be preceded by `vlv.`

  ```
  bin/rebuild-index --index vlv.thisIndexName
  ```

  |   |                                                                                                                                                                                                                    |
  | - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  |   | For the exact name to use in rebuilding the index, run the `dbtest` tool with the `list-database-containers` option and `--backendID` property.```
  bin/dbtest list-database-containers --backendID {backendID}
  ``` |

## Deleting a VLV index

### About this task

Delete a VLV index using the `dsconfig` tool. Before deleting it, check that the index is not being used in any plugin applications.

### Steps

1. To remove a VLV index from the database, use `dsconfig` with the `delete-local-db-vlv-index` option.

   #### Example:

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

2. To verify the deletion, try to view the VLV index.

   #### Example:

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