Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 96cfabf

Browse files
Merge pull request #34445 from thesqlsith/patch-2
Update optional-parameter-optimization.md
2 parents fb09025 + 39cba74 commit 96cfabf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/relational-databases/performance/optional-parameter-optimization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ In this example, SQL Server always chooses a plan that scans table `Table1`, eve
3131

3232
The Optional Parameter Plan optimization (OPPO) feature uses the adaptive plan optimization (Multiplan) infrastructure that was introduced with the Parameter Sensitive Plan optimization improvement, which generates multiple plans from a single statement. This allows the feature to make different assumptions depending on the parameter values used in the query. During query execution time, OPPO selects the appropriate plan:
3333

34-
- where the parameter value isn't NULL, it uses a seek plan or something more optimal than a full scan plan.
35-
- where the parameter value is NULL, it uses a scan plan.
34+
- where the parameter value `IS NOT NULL`, it uses a seek plan or something more optimal than a full scan plan.
35+
- where the parameter value is `NULL`, it uses a scan plan.
3636

3737
As part of the adaptive plan optimization feature family which includes [Parameter Sensitive Plan optimization](parameter-sensitive-plan-optimization.md), OPPO provides a solution to the second component of the Multiplan feature set, which covers dynamic search capabilities.
3838

@@ -95,7 +95,7 @@ OPPO can generate two query variants that might have the following attributes ad
9595

9696
SELECT * FROM Properties PLAN PER VALUE(ObjectID = 1234, QueryVariantID = *1*, *optional_predicate*(@bedrooms is NULL))
9797

98-
- `@bedrooms` isn't `NULL`
98+
- `@bedrooms IS NOT NULL`
9999

100100
SELECT * FROM Properties WHERE bedrooms = @bedrooms PLAN PER VALUE(ObjectID = 1234, QueryVariantID = *2*, *optional_predicate*(@bedrooms is NULL))
101101

0 commit comments

Comments
 (0)