Table of Contents

Class ObjectSchema.PlanGuide

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

sys.plan_guides (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Contains a row for each plan guide in the database.


See sys.plan_guides.

[Table(Schema = "sys", Name = "plan_guides", IsView = true)]
public class ObjectSchema.PlanGuide
Inheritance
ObjectSchema.PlanGuide
Extension Methods

Properties

CreateDate

Date and time the plan guide was created.

[Column("create_date")]
[NotNull]
public DateTime CreateDate { get; set; }

Property Value

DateTime

Hints

The OPTION clause hints associated with the plan guide.

[Column("hints")]
[Nullable]
public string? Hints { get; set; }

Property Value

string

IsDisabled

1 = Plan guide is disabled.

0 = Plan guide is enabled.

[Column("is_disabled")]
[NotNull]
public bool IsDisabled { get; set; }

Property Value

bool

ModifyDate

Date the plan guide was last modified.

[Column("modify_date")]
[NotNull]
public object ModifyDate { get; set; }

Property Value

object

Name

Name of the plan guide.

[Column("name")]
[NotNull]
public string Name { get; set; }

Property Value

string

Parameters

The string defining the list of parameters associated with the plan guide.

NULL = No parameter list is associated with the plan guide.

[Column("parameters")]
[Nullable]
public string? Parameters { get; set; }

Property Value

string

PlanGuideID

Unique identifier of the plan guide in the database.

[Column("plan_guide_id")]
[NotNull]
public int PlanGuideID { get; set; }

Property Value

int

QueryText

Text of the query on which the plan guide is created.

[Column("query_text")]
[Nullable]
public string? QueryText { get; set; }

Property Value

string

ScopeBatch

Batch text, if scope_type is SQL.

NULL if batch type is not SQL.

If NULL and scope_type is SQL, the value of query_text applies.

[Column("scope_batch")]
[Nullable]
public string? ScopeBatch { get; set; }

Property Value

string

ScopeObjectID

object_id of the object defining the scope of the plan guide, if the scope is OBJECT.

NULL if the plan guide is not scoped to OBJECT.

[Column("scope_object_id")]
[Nullable]
public object? ScopeObjectID { get; set; }

Property Value

object

ScopeType

Identifies the scope of the plan guide.

1 = OBJECT

2 = SQL

3 = TEMPLATE

[Column("scope_type")]
[NotNull]
public byte ScopeType { get; set; }

Property Value

byte

ScopeTypeDesc

Description of scope of the plan guide.

OBJECT

SQL

TEMPLATE

[Column("scope_type_desc")]
[Nullable]
public string? ScopeTypeDesc { get; set; }

Property Value

string