OptimizationLevel EnumerationOptimizationLevel EnumerationOptimizationLevel Enumeration

Specifies the level of optimization to perform during query compilation.

Syntax

Public Enumeration OptimizationLevel
public enum OptimizationLevel
public:
enum OptimizationLevel
 
The OptimizationLevelOptimizationLevelOptimizationLevel type exposes the following members.

Members

 MemberDescription
MemberGlobalGlobalGlobal Localized and global query optimizations are performed, including those that significantly change the structure of the query.
MemberJoinJoinJoin Join optimizations are performed, in addition to local and global optimizations.
MemberLocalLocalLocal Only localized query optimizations are performed. In particular, common subexpression elimination is not applied.
MemberNoneNoneNone No query optimization is performed.
MemberSpecializationSpecializationSpecialization Function speciailzation is performed, in addition to join, local and global optimizations.

Top

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.