Skip to content

Commit 622152f

Browse files
authored
Merge pull request #34785 from WilliamDAssafMSFT/20250724-vector
20250724 update vector product applicability
2 parents ac7af75 + 36a4f61 commit 622152f

File tree

6 files changed

+96
-89
lines changed

6 files changed

+96
-89
lines changed
Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: "sys.vector_indexes (Transact-SQL)"
33
description: "sys.vector_indexes contains a row per vector index."
4-
author: damauri
5-
ms.author: damauri
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
66
ms.reviewer: damauri, pookam
7-
ms.date: 06/11/2025
8-
ms.topic: reference
7+
ms.date: 07/24/2025
98
ms.service: sql
109
ms.subservice: system-objects
10+
ms.topic: reference
1111
f1_keywords:
1212
- "sys.vector_indexes"
1313
- "vector_indexes"
@@ -21,45 +21,46 @@ monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17"
2121
---
2222
# sys.vector_indexes (Transact-SQL)
2323

24-
[!INCLUDE [SQL Server 2025](../../includes/applies-to-version/_ss2025.md)]
24+
[!INCLUDE [SQL Server 2025](../../includes/applies-to-version/sqlserver2025.md)]
25+
26+
The `sys.vector_indexes` system catalog view contains one row per vector index.
2527

26-
Contains a row per vector index.
27-
2828
|Column name|Data type|Description|
2929
|-----------------|---------------|-----------------|
30-
|**object_id**|int|Reference to sys.indexes|
31-
|**index_id**|int|Reference to sys.indexes|
32-
|**metric**|varchar(20)|Type of vector index (DiskANN only for now)|
33-
|**type_desc**|varchar(20)|Metric used to create the vector index|
34-
|**build_parameters**|nvarchar(max)|Internal usage only|
30+
|`object_id`|**int**|Reference to `sys.indexes`.|
31+
|`index_id`|**int**|Reference to `sys.indexes`.|
32+
|`metric`|**varchar(20)**|Type of vector index (Currently, DiskANN only).|
33+
|`type_desc`|**varchar(20)**|Metric used to create the vector index.|
34+
|`build_parameters`|**nvarchar(max)**|Internal usage only.|
3535

36+
## Permissions
3637

37-
## Permissions
38+
[!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../security/metadata-visibility-configuration.md).
3839

39-
[!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md).
40-
41-
## Examples
40+
## Examples
4241

4342
The following example returns all indexes for the table `[dbo].[[wikipedia_articles_embeddings]` used in the [DiskANN sample](https://github.com/Azure-Samples/azure-sql-db-vector-search/tree/main/DiskANN/Wikipedia) available in the [https://github.com/Azure-Samples/azure-sql-db-vector-search](https://github.com/Azure-Samples/azure-sql-db-vector-search) GitHub sample repo.
44-
43+
4544
```sql
46-
select
47-
vi.obj_id,
48-
vi.index_id,
49-
vi.index_type,
50-
vi.dist_metric,
51-
vi.build_parameters
52-
from
53-
sys.indexes i
54-
inner join
55-
sys.vector_indexes as vi on vi.obj_id = i.object_id and vi.index_id = i.index_id
56-
where
57-
obj_id = object_id('[dbo].[wikipedia_articles_embeddings]')
45+
SELECT
46+
vi.obj_id,
47+
vi.index_id,
48+
vi.index_type,
49+
vi.dist_metric,
50+
vi.build_parameters
51+
FROM
52+
sys.indexes AS i
53+
INNER JOIN
54+
sys.vector_indexes AS vi
55+
ON vi.obj_id = i.object_id
56+
AND vi.index_id = i.index_id
57+
WHERE
58+
obj_id = object_id('[dbo].[wikipedia_articles_embeddings]');
5859
```
59-
60-
## Next steps
6160

62-
[Object Catalog Views (Transact-SQL)](../../relational-databases/system-catalog-views/object-catalog-views-transact-sql.md)
63-
[Catalog Views (Transact-SQL)](../../relational-databases/system-catalog-views/catalog-views-transact-sql.md)
64-
[sys.indexes (Transact-SQL)](../../relational-databases/system-catalog-views/sys-indexes-transact-sql.md)
65-
[CREATE VECTOR INDEX (Transact-SQL)](../../t-sql/statements/create-vector-index-transact-sql.md)
61+
## Related content
62+
63+
- [Object catalog views (Transact-SQL)](object-catalog-views-transact-sql.md)
64+
- [System catalog views (Transact-SQL)](catalog-views-transact-sql.md)
65+
- [sys.indexes (Transact-SQL)](sys-indexes-transact-sql.md)
66+
- [CREATE VECTOR INDEX (Transact-SQL)](../../t-sql/statements/create-vector-index-transact-sql.md)

docs/relational-databases/vectors/vectors-faq.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Vector & Embeddings Frequently Asked Questions (FAQ)
3-
description: Answers to common questions about vector search and vector indexes in SQL Server.
4-
author: yorek
5-
ms.author: damauri
6-
ms.reviewer: damauri
7-
ms.date: 07/17/2025
3+
description: Answers to common questions about vector search and vector indexes in the SQL Database Engine.
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.reviewer: damauri, mikeray
7+
ms.date: 07/24/2025
88
ms.service: sql
99
ms.topic: language-reference
1010
ms.collection:
@@ -21,6 +21,8 @@ monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-curre
2121

2222
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
2323

24+
This article contains frequently asked questions about vectors and embeddings in the SQL Database Engine.
25+
2426
> [!NOTE]
2527
> Vector features are available in Azure SQL Managed Instance configured with the [Always-up-to-date](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy) policy.
2628
@@ -46,7 +48,7 @@ For more information about how to choose the right embedding model, see [Embeddi
4648

4749
## What about sparse vectors?
4850

49-
At this time, the **vector** data type in SQL Server is designed for dense vectors, which are arrays of floating-point numbers where most of the elements are non-zero. Sparse vectors, which contain a significant number of zero elements, aren't natively supported.
51+
At this time, the **vector** data type in the SQL Database Engine is designed for dense vectors, which are arrays of floating-point numbers where most of the elements are non-zero. Sparse vectors, which contain a significant number of zero elements, aren't natively supported.
5052

5153
## What are some performance benchmarks for SQL vector search?
5254

@@ -59,19 +61,19 @@ If you have multiple columns that you want to use for generating embeddings, you
5961
- Create one embedding for each column, or
6062
- Concatenate the values of multiple columns into a single string and then generate a single embedding for that concatenated string.
6163

62-
For more information about the two options and the related database design considerations, see [Efficiently and Elegantly Modeling Embeddings in Azure SQL and SQL Server](https://devblogs.microsoft.com/azure-sql/efficiently-and-elegantly-modeling-embeddings-in-azure-sql-and-sql-server/).
64+
For more information about the two options and the related database design considerations, see [Efficiently and Elegantly Modeling Embeddings](https://devblogs.microsoft.com/azure-sql/efficiently-and-elegantly-modeling-embeddings-in-azure-sql-and-sql-server/).
6365

6466
## What about re-ranking?
6567

66-
Re-ranking is a technique used to improve the relevance of search results by re-evaluating the initial results based on additional criteria or models. In SQL Server, you can implement re-ranking by combining vector search with full-text (which provides BM25 ranking) or additional SQL queries or machine learning models to refine the results based on specific business logic or user preferences.
68+
Re-ranking is a technique used to improve the relevance of search results by re-evaluating the initial results based on additional criteria or models. In the SQL Database Engine, you can implement re-ranking by combining vector search with full-text (which provides BM25 ranking) or additional SQL queries or machine learning models to refine the results based on specific business logic or user preferences.
6769

68-
For more information, review [Enhancing Search Capabilities in SQL Server and Azure SQL with Hybrid Search and RRF Re-Ranking](https://devblogs.microsoft.com/azure-sql/enhancing-search-capabilities-in-sql-server-and-azure-sql-with-hybrid-search-and-rrf-re-ranking/).
70+
For more information, review [Enhancing Search Capabilities with Hybrid Search and RRF Re-Ranking](https://devblogs.microsoft.com/azure-sql/enhancing-search-capabilities-in-sql-server-and-azure-sql-with-hybrid-search-and-rrf-re-ranking/).
6971

7072
## When to use AI Search (now AI Foundry) vs using SQL for vectors search scenarios?
7173

7274
AI Search (now AI Foundry) is a specialized service designed for advanced search scenarios, including vector search, natural language processing, and AI-driven insights. It provides a comprehensive set of features for building intelligent search applications, such as built-in support for various AI models, advanced ranking algorithms, and integration with other AI services.
7375

74-
Azure SQL and SQL Server provide the ability to store any kind of data and run any kind of query: structured and unstructured, and to perform vector search on that data. It is a good choice for scenarios where you need to do search across all these data together, and you don't want to use a separate service for search that would complicate your architecture. Azure SQL and SQL Server offer critical enterprise security features to make sure data is always protected, such as row-level security (RLS), dynamic data masking (DDM), Always Encrypted, immutable ledger tables, and transparent data encryption (TDE).
76+
The SQL Database Engine provides the ability to store any kind of data and run any kind of query: structured and unstructured, and to perform vector search on that data. It is a good choice for scenarios where you need to do search across all these data together, and you don't want to use a separate service for search that would complicate your architecture. The SQL Database Engine offers critical enterprise security features to make sure data is always protected, such as row-level security (RLS), dynamic data masking (DDM), Always Encrypted, immutable ledger tables, and transparent data encryption (TDE).
7577

7678
Here's an example of a single query that can be run in Azure SQL or SQL Server that combines vector, geospatial, structured and unstructured data all at once. The sample query retrieves the top 50 most relevant restaurants based on the description of the restaurant, the location of the restaurant, and the user's preferences, using vector search for the description and geospatial search for the location, filtering also by star numbers, number of reviews, category and so on:
7779

docs/relational-databases/vectors/vectors-sql-server.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: Vector Search & Vector Index in the SQL Database Engine
33
description: How to create, manage, and search vectors in the SQL Database Engine.
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
6-
ms.reviewer: damauri, pookam, jovanpop, randolphwest
7-
ms.date: 07/17/2025
6+
ms.reviewer: damauri, pookam, jovanpop, randolphwest, mikeray
7+
ms.date: 07/24/2025
88
ms.service: sql
99
ms.topic: language-reference
1010
ms.collection:
@@ -21,10 +21,14 @@ monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-curre
2121

2222
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
2323

24+
The SQL Database Engine provides the ability to store any kind of data and run any kind of query: structured and unstructured, and to perform vector search on that data. It is a good choice for scenarios where you need to do search across all these data together, and you don't want to use a separate service for search that would complicate your architecture.
25+
2426
> [!NOTE]
25-
> - Vector features are available in Azure SQL Managed Instance configured with the [Always-up-to-date](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy) policy.
27+
> - Vector support in preview and is subject to change. Make sure to read preview usage terms in [Service Level Agreements (SLA) for Online Services](https://www.microsoft.com/licensing/docs/view/Service-Level-Agreements-SLA-for-Online-Services).
28+
29+
Vector features are available in Azure SQL Managed Instance configured with the [Always-up-to-date](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy) policy.
2630

27-
## Vectors
31+
## Vectors
2832

2933
Vectors are ordered arrays of numbers (typically floats) that can represent information about some data. For example, an image can be represented as a vector of pixel values, or a string of text can be represented as a vector of ASCII values. The process to turn data into a vector is called vectorization. The **[vector](../../t-sql/data-types/vector-data-type.md)** data type in SQL Server is designed to store these arrays of numbers efficiently.
3034

docs/t-sql/functions/vector-norm-transact-sql.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ description: "VECTOR_NORM takes a vector as an input and returns the norm of the
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: damauri, pookam
7-
ms.date: 02/18/2025
8-
ms.update-cycle: 180-days
7+
ms.date: 07/24/2025
98
ms.service: sql
109
ms.subservice: t-sql
1110
ms.topic: reference
11+
ms.collection:
12+
- ce-skilling-ai-copilot
13+
ms.update-cycle: 180-days
14+
ms.custom:
15+
- build-2025
1216
f1_keywords:
1317
- "VECTOR_NORM"
1418
- "VECTOR_NORM_TSQL"
@@ -17,32 +21,31 @@ helpviewer_keywords:
1721
- "vector, norm calculation"
1822
dev_langs:
1923
- "TSQL"
20-
monikerRange: "= azuresqldb-current"
21-
ms.collection: ce-skilling-ai-copilot
22-
ms.custom:
23-
- build-2025
24+
monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-current || =azuresqldb-mi-current || =fabric"
2425
---
2526
# VECTOR_NORM (Transact-SQL) (Preview)
2627

27-
[!INCLUDE [Azure SQL Database](../../includes/applies-to-version/asdb.md)]
28+
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
2829

29-
> [!NOTE]
30-
> This data type is in preview and is subject to change. Make sure to read preview usage terms in the [Service Level Agreements (SLA) for Online Services](https://www.microsoft.com/licensing/docs/view/Service-Level-Agreements-SLA-for-Online-Services) document.
31-
32-
Takes a vector as an input and returns the norm of the vector (which is a measure of its length or magnitude) in a given [norm type](https://mathworld.wolfram.com/VectorNorm.html).
30+
Use `VECTOR_NORM` to take a vector as an input and return the norm of the vector (which is a measure of its length or magnitude) in a given [norm type](https://mathworld.wolfram.com/VectorNorm.html).
3331

3432
For example, if you want to calculate the Euclidean norm (which is the most common norm type), you can use:
3533

3634
```sql
3735
SELECT VECTOR_NORM ( vector, 'norm2' )
3836
FROM ...
3937
```
40-
41-
## Syntax
42-
38+
39+
> [!NOTE]
40+
> This data type is in preview and is subject to change. Make sure to read preview usage terms in the [Service Level Agreements (SLA) for Online Services](https://www.microsoft.com/licensing/docs/view/Service-Level-Agreements-SLA-for-Online-Services) document.
41+
42+
`VECTOR_NORM` is available in Azure SQL Managed Instance configured with the [Always-up-to-date](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy) update policy.
43+
44+
## Syntax
45+
4346
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
4447

45-
```syntaxsql
48+
```syntaxsql
4649
VECTOR_NORM ( vector, norm_type )
4750
```
4851

@@ -64,7 +67,7 @@ A string with the name of the norm type to use to calculate the norm of the give
6467

6568
The function returns a **float** value that represents the norm of the vector using the specified norm type.
6669

67-
An error is returned if *norm_type* isn't a valid norm type and if the vector is not of the [vector data type](../../t-sql/data-types/vector-data-type.md).
70+
An error is returned if *norm_type* isn't a valid norm type and if the vector is not of the [vector data type](../data-types/vector-data-type.md).
6871

6972
## Examples
7073

docs/t-sql/functions/vector-normalize-transact-sql.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ description: "VECTOR_NORMALIZE takes a vector as an input and returns the normal
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: damauri, pookam
7-
ms.date: 02/18/2025
8-
ms.update-cycle: 180-days
7+
ms.date: 07/24/2025
98
ms.service: sql
109
ms.subservice: t-sql
1110
ms.topic: reference
11+
ms.collection:
12+
- ce-skilling-ai-copilot
13+
ms.update-cycle: 180-days
1214
f1_keywords:
1315
- "VECTOR_NORMALIZE"
1416
- "VECTOR_NORMALIZE_TSQL"
@@ -17,17 +19,13 @@ helpviewer_keywords:
1719
- "vector, normalize calculation"
1820
dev_langs:
1921
- "TSQL"
20-
monikerRange: "= azuresqldb-current"
21-
ms.collection: ce-skilling-ai-copilot
22+
monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-current || =azuresqldb-mi-current || =fabric"
2223
---
2324
# VECTOR_NORMALIZE (Transact-SQL) (Preview)
2425

25-
[!INCLUDE [Azure SQL Database](../../includes/applies-to-version/asdb-asdbmi.md)]
26+
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
2627

27-
> [!NOTE]
28-
> This data type is in preview and is subject to change. Make sure to read preview usage terms in the [Service Level Agreements (SLA) for Online Services](https://www.microsoft.com/licensing/docs/view/Service-Level-Agreements-SLA-for-Online-Services) document.
29-
30-
`VECTOR_NORMALIZE` takes a vector as an input and returns the normalized vector, which is a vector scaled to have a length of 1 in a given [norm type](https://mathworld.wolfram.com/VectorNorm.html).
28+
Use `VECTOR_NORMALIZE` to take a vector as an input and return the normalized vector, which is a vector scaled to have a length of 1 in a given [norm type](https://mathworld.wolfram.com/VectorNorm.html).
3129

3230
This standardization is crucial in various artificial intelligence applications where vectors represent different forms of data, such as visual content, textual information, or audio signals. By normalizing vectors, we ensure uniformity in their scale, which is particularly useful for operations that rely on measuring vector distances or for grouping and distinguishing data points.
3331

@@ -46,7 +44,8 @@ FROM ...
4644

4745
> [!NOTE]
4846
> - This function is in preview and is subject to change. Make sure to read preview usage terms in [Service Level Agreements (SLA) for Online Services](https://www.microsoft.com/licensing/docs/view/Service-Level-Agreements-SLA-for-Online-Services).
49-
> - `VECTOR_NORMALIZE` is available in Azure SQL Managed Instance configured with the [Always-up-to-date](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy) update policy.
47+
48+
`VECTOR_NORMALIZE` is available in Azure SQL Managed Instance configured with the [Always-up-to-date](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy) update policy.
5049

5150
## Syntax
5251

@@ -76,7 +75,7 @@ The result is a vector with the same direction as the input vector but with a le
7675

7776
If the input is `NULL`, the returned result will also be `NULL`.
7877

79-
An error is returned if *norm_type* isn't a valid norm type and if the *vector* is not of the [vector](../../t-sql/data-types/vector-data-type.md) data type.
78+
An error is returned if *norm_type* isn't a valid norm type and if the *vector* is not of the [vector](../data-types/vector-data-type.md) data type.
8079

8180
## Examples
8281

@@ -108,6 +107,6 @@ SELECT VECTOR_NORMALIZE(@v, 'norm1'), VECTOR_NORMALIZE(@v, 'norminf');
108107

109108
## Related content
110109

111-
- [Vector functions (Transact SQL)](../..//t-sql/functions/vector-functions-transact-sql.md)
112-
- [Vector data type](../../t-sql/data-types/vector-data-type.md)
110+
- [Vector functions (preview)](vector-functions-transact-sql.md)
111+
- [Vector data type](../data-types/vector-data-type.md)
113112
- [Intelligent applications with Azure SQL Database](/azure/azure-sql/database/ai-artificial-intelligence-intelligent-applications)

0 commit comments

Comments
 (0)