Manage Indexes

  • Capella Operational
      +
      You can perform some index management tasks using the Couchbase Capella UI.

      Accessing Indexes in the Capella UI

      Permissions Required

      To access indexes in the Couchbase Capella UI, you need the following permissions:

      You need the Project Owner or Cluster Data Reader/Writer role for the project containing the cluster.

      To view the Indexes page for a cluster that’s running the Index Service:

      1. With the Projects tab in your organization open, click the project with the cluster you’re working with.

      2. With the Operational tab open, select your cluster.

      3. Go to Data Tools  Indexes.

      Index Summary

      The Indexes page summarizes all indexes on the cluster in a tabular format. It includes sortable columns and a row for each index.

      Each index has the following information:

      Statistic Description

      Name

      The name of the index or replica.

      Reqs/sec

      The number of requests per second.

      Resident

      The percentage of the data held in memory.

      Items

      The number of items indexed.

      Size

      The size of indexable data that’s maintained for the index or replica.

      Status

      The current state of the Index Service on the node where this index is stored. The possible statuses include ready, pause, or warmup.

      Last Scan

      The latest scan time.

      Keyspace

      The keyspace for which the index or replica was created.

      Create an Index

      Indexes are created using the SQL++ query language. The Query tab can create, modify, and drop indexes using SQL++ statements.

      Inspect an Index

      The Index Definition section displays the SQL++ statement used to define the index. Directly below it is a snippet of the information from the index list.

      To view the details of an index: Select its name on the Indexes page.

      Open the Index Definition

      Use the SQL++ query language to define and edit indexes. Using the query editor, you can modify the index definition as required to create a new index. You can’t change the definition of the existing index. You can create a new index with the modified definition and then drop the old index.

      To open the index definition in the Query tab: Click Open definition in Query Editor.

      The index definition is added to the query editor.

      View Index Performance

      The Bucket’s Index Performance section displays statistics for the Index Service or the selected bucket that the current index is defined for.

      The following statistics are available:

      Statistic Description Applies To

      Index Service RAM Quota

      The buffer cache size for the Index Service across all nodes.

      Index Service.

      Index Service RAM Percent

      The amount of memory used by the Index Service, as a percentage of the amount of memory available to the Index Service.

      Index Service.

      Total Scan Rate

      The number of index items scanned by the Index Service per second for the selected bucket.

      Selected bucket.

      RAM Used/Remaining

      The amount of memory used by the Index Service, and the remaining amount of memory available to the Index Service.

      Index Service.

      Index Fragmentation

      The percentage fragmentation of all indexes for the selected bucket. This indicates the percentage of disk space consumed by the indexes, but not utilized for items stored in the indexes.

      Selected bucket.

      Scan Rate (over 5 minutes)

      The number of rows or index entries returned by a scan on this index over the last five minutes.

      Index Service.

      Index Disk Size

      The total disk file size consumed by all indexes for the selected bucket.

      Selected bucket.

      Index Data Size

      The actual data size consumed by all indexes for the selected bucket.

      Selected bucket.

      Drop an Index

      You can also drop an index using the SQL++ DROP INDEX or DROP PRIMARY INDEX commands.

      To drop an index:

      1. On the Indexes page, find the index.

      2. Click the Trash icon at the end of its row.

      3. When prompted to confirm the deletion, type "delete" and click Delete Index to drop the index.