Stay organized with collections
Save and categorize content based on your preferences.
This document explains different options that you can use to maintain vector
indexes. You might want to maintain indexes to ensure that your indexes adapt to
the changes in data that might impact accuracy of your search results. As your
dataset grows, use the strategies in the following sections to avoid degradation
in query performance.
View vector index metrics
If your table is prone to frequent updates or insertions, then we recommend
periodically reindexing the existing ScaNN index
in order to improve the recall accuracy for your index. You can monitor
index metrics to view changes in vector distributions or vector mutations since
the index was built, and then reindex accordingly.
You can manually rebuild your index if you want to
rebuild it with the configurations you specified when it was created.
To manually rebuild your index, run the following command:
REINDEXINDEXCONCURRENTLYINDEX_NAME;
Replace INDEX_NAME with the name of the index you want to
rebuild—for example, my-scann-index. The index names are shared
across your database. Ensure that each index name is unique to each
table in your database.
For more information about reindexing in PostgreSQL, see
REINDEX.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["Maintaining vector indexes is crucial for adapting to data changes and ensuring accurate search results."],["Periodic reindexing of ScaNN indexes is recommended for tables with frequent updates or insertions to enhance recall accuracy."],["Vector index metrics can be monitored to identify changes in vector distributions or mutations, aiding in the decision to reindex."],["Indexes can be manually rebuilt using the `REINDEX INDEX CONCURRENTLY` command, maintaining the original configurations."],["The name provided for each index should be unique across the database, and shared between all tables."]]],[]]