Edit

Share via


sys.vector_indexes (Transact-SQL)

Applies to: SQL Server 2025 (17.x) Preview

The sys.vector_indexes system catalog view contains one row per vector index.

Column name Data type Description
object_id int Reference to sys.indexes.
index_id int Reference to sys.indexes.
metric varchar(20) Type of vector index (Currently, DiskANN only).
type_desc varchar(20) Metric used to create the vector index.
build_parameters nvarchar(max) Internal usage only.

Permissions

The visibility of the metadata in catalog views is limited to securables that a user either owns, or on which the user was granted some permission. For more information, see Metadata Visibility Configuration.

Examples

The following example returns all indexes for the table [dbo].[[wikipedia_articles_embeddings] used in the DiskANN sample available in the https://github.com/Azure-Samples/azure-sql-db-vector-search GitHub sample repo.

SELECT
    vi.obj_id,
    vi.index_id,
    vi.index_type,
    vi.dist_metric,
    vi.build_parameters
FROM
    sys.indexes AS i 
INNER JOIN 
    sys.vector_indexes AS vi 
    ON vi.obj_id = i.object_id 
    AND vi.index_id = i.index_id
WHERE
    obj_id = object_id('[dbo].[wikipedia_articles_embeddings]');