OptimizationLevel EnumerationOptimizationLevel EnumerationOptimizationLevel Enumeration
Specifies the level of optimization to perform during query compilation.
The OptimizationLevelOptimizationLevelOptimizationLevel
type exposes the following members.
Members
Member | Description | |
---|---|---|
![]() | GlobalGlobalGlobal | Localized and global query optimizations are performed, including those that significantly change the structure of the query. |
![]() | JoinJoinJoin | Join optimizations are performed, in addition to local and global optimizations. |
![]() | LocalLocalLocal | Only localized query optimizations are performed. In particular, common subexpression elimination is not applied. |
![]() | NoneNoneNone | No query optimization is performed. |
![]() | SpecializationSpecializationSpecialization | Function speciailzation is performed, in addition to join, local and global optimizations. |
Remarks
The optimization level controls the kinds of optimizations performed which will be performed during compilation of an XQuery program, and XPath expression or an XSL transformation.
Higher levels of optimization may increase the time taken to compile a query, but typically improve the execution speed. This is particularly noticeable when the query performs a significant amount of computation or is dealing with large input data.
Use the OptimizationLevelOptimizationLevelOptimizationLevel property to set the level of optimization that will be performed during the compilation of an XQuery program, an XPath expression or an XSL transformation.