SqlConnection.StatisticsEnabled 属性

定义

设置为 “ true设置为”时,启用当前连接的统计信息收集。

public:
 property bool StatisticsEnabled { bool get(); void set(bool value); };
public bool StatisticsEnabled { get; set; }
member this.StatisticsEnabled : bool with get, set
Public Property StatisticsEnabled As Boolean

属性值

如果启用了统计信息收集,则返回 true ;否则 false返回 。 false 是默认值。

注解

启用统计信息收集对性能有轻微但可衡量的影响,因此应仅在需要时才启用。

适用于

另请参阅