Skip to content

Commit 334a149

Browse files
20230818 noexpand
1 parent 9d17164 commit 334a149

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/relational-databases/query-processing-architecture-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ The join order in the query plan is `Table1`, `Table2`, `TableA`, `TableB`, `Tab
347347

348348
As with any index, [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)] chooses to use an indexed view in its query plan only if the Query Optimizer determines it is beneficial to do so.
349349

350-
Indexed views can be created in any edition of [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)]. In some editions of some versions of [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)], the Query Optimizer automatically considers the indexed view. In some editions of some versions of [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)], to use an indexed view, the `NOEXPAND` table hint must be used. For clarification, see the documentation for each version.
350+
Indexed views can be created in any edition of [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)]. In some editions of some older versions of [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)], the Query Optimizer automatically considers the indexed view. In some editions of some older versions of [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)], to use an indexed view, the `NOEXPAND` table hint must be used. Prior to [!INCLUDE [ssSQL15_md](../includes/sssql16-md.md)] Service Pack 1, automatic use of an indexed view by the query optimizer is supported only in specific editions of [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)]. Since, all editions support automatic use of an indexed view. [!INCLUDE [ssazure-sqldb](../includes/ssazure-sqldb.md)] and [!INCLUDE [ssazuremi_md](../includes/ssazuremi_md.md)] also support automatic use of indexed views without specifying the `NOEXPAND` hint.
351351

352352
The [!INCLUDE [ssNoVersion](../includes/ssnoversion-md.md)] Query Optimizer uses an indexed view when the following conditions are met:
353353

docs/t-sql/queries/hints-transact-sql-query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Specifies the indexed views are expanded. Also specifies the Query Optimizer won
187187
This query hint virtually disallows direct use of indexed views and indexes on indexed views in the query plan.
188188

189189
> [!NOTE]
190-
> The indexed view remains condensed if there's a direct reference to the view in the query's SELECT part. The view also remains condensed if you specify WITH (NOEXPAND) or WITH (NOEXPAND, INDEX( *<index_value>* [ , *...n* ] ) ). For more information about the query hint NOEXPAND, see [Using NOEXPAND](../queries/hints-transact-sql-table.md#using-noexpand).
190+
> The indexed view remains condensed if there's a direct reference to the view in the query's SELECT part. The view also remains condensed if you specify `WITH (NOEXPAND)` or `WITH (NOEXPAND, INDEX( <index_value> [ , *...n* ] ) )`. For more information about the query hint NOEXPAND, see [Using NOEXPAND](../queries/hints-transact-sql-table.md#using-noexpand).
191191
192192
The hint only affects the views in the statements' SELECT part, including those views in INSERT, UPDATE, MERGE, and DELETE statements.
193193

0 commit comments

Comments
 (0)