Class CompatibilitySchema.CacheObject
- Namespace
- LinqToDB.Tools.DataProvider.SqlServer.Schemas
- Assembly
- linq2db.Tools.dll
sys.syscacheobjects (Transact-SQL)
Applies to: √ SQL Server (all supported versions)
Contains information about how the cache is used.
important
This SQL Server 2000 system table is included as a view for backward compatibility. We recommend that you use the current SQL Server system views instead. To find the equivalent system view or views, see Mapping System Tables to System Views (Transact-SQL). This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
See sys.syscacheobjects.
[Table(Schema = "sys", Name = "syscacheobjects", IsView = true)]
public class CompatibilitySchema.CacheObject
- Inheritance
-
CompatibilitySchema.CacheObject
- Extension Methods
Properties
AvgExecTime
For backward compatibility only. Always returns 0.
[Column("avgexectime")]
[Nullable]
public long? AvgExecTime { get; set; }
Property Value
- long?
BucketID
Bucket ID. Value indicates a range from 0 through (directory size - 1). Directory size is the size of the hash table.
[Column("bucketid")]
[NotNull]
public int BucketID { get; set; }
Property Value
CacheObjType
Type of object in the cache:
Compiled plan
Executable plan
Parse tree
Cursor
Extended stored procedure
[Column("cacheobjtype")]
[NotNull]
public string CacheObjType { get; set; }
Property Value
DateFormat
Date format of the connection that created the cache object.
[Column("dateformat")]
[Nullable]
public short? DateFormat { get; set; }
Property Value
DbID
Database ID in which the cache object was compiled.
[Column("dbid")]
[Nullable]
public short? DbID { get; set; }
Property Value
DbIDExec
Database ID from which the query is executed.
For most objects, dbidexec has the same value as dbid.
For system views, dbidexec is the database ID from which the query is executed.
For ad hoc queries, dbidexec is 0. This means dbidexec has the same value as dbid.
[Column("dbidexec")]
[Nullable]
public short? DbIDExec { get; set; }
Property Value
LangID
Language ID. ID of the language of the connection that created the cache object.
[Column("langid")]
[Nullable]
public short? LangID { get; set; }
Property Value
LastReads
For backward compatibility only. Always returns 0.
[Column("lastreads")]
[Nullable]
public long? LastReads { get; set; }
Property Value
- long?
LastTime
For backward compatibility only. Always returns 0.
[Column("lasttime")]
[Nullable]
public long? LastTime { get; set; }
Property Value
- long?
LastWrites
For backward compatibility only. Always returns 0.
[Column("lastwrites")]
[Nullable]
public long? LastWrites { get; set; }
Property Value
- long?
MaxExecTime
For backward compatibility only. Always returns 0.
[Column("maxexectime")]
[Nullable]
public long? MaxExecTime { get; set; }
Property Value
- long?
ObjID
One of the main keys used for looking up an object in the cache. This is the object ID stored in sysobjects for database objects (procedures, views, triggers, and so on). For cache objects such as ad hoc or prepared SQL, objid is an internally generated value.
[Column("objid")]
[Nullable]
public int? ObjID { get; set; }
Property Value
- int?
ObjType
Type of object:
Stored procedure
Prepared statement
Ad hoc query (Transact-SQL submitted as language events from the sqlcmd or osql utilities, instead of remote procedure calls)
ReplProc (replication procedure)
Trigger
View
Default
User table
System table
Check
Rule
[Column("objtype")]
[NotNull]
public string ObjType { get; set; }
Property Value
PagesUsed
Number of pages consumed by the cache object.
[Column("pagesused")]
[Nullable]
public int? PagesUsed { get; set; }
Property Value
- int?
RefCounts
Number of other cache objects referencing this cache object. A count of 1 is the base.
[Column("refcounts")]
[NotNull]
public int RefCounts { get; set; }
Property Value
SetOptions
SET option settings that affect a compiled plan. These settings are part of the cache key. Changes to values in this column indicate users have modified SET options. These options include the following:
ANSI_PADDING
FORCEPLAN
CONCAT_NULL_YIELDS_NULL
ANSI_WARNINGS
ANSI_NULLS
QUOTED_IDENTIFIER
ANSI_NULL_DFLT_ON
ANSI_NULL_DFLT_OFF
[Column("setopts")]
[Nullable]
public int? SetOptions { get; set; }
Property Value
- int?
Sql
Module definition or the first 3900 characters of the batch submitted.
[Column("sql")]
[Nullable]
public string? Sql { get; set; }
Property Value
SqlBytes
Length in bytes of the procedure definition or batch submitted.
[Column("sqlbytes")]
[Nullable]
public int? SqlBytes { get; set; }
Property Value
- int?
Status
Indicates whether the cache object is a cursor plan. Currently, only the least significant bit is used.
[Column("status")]
[Nullable]
public int? Status { get; set; }
Property Value
- int?
UID
Indicates the creator of the plan for ad hoc query plans and prepared plans.
-2 = The batch submitted does not depend on implicit name resolution and can be shared among different users. This is the preferred method. Any other value represents the user ID of the user submitting the query in the database.
Overflows or returns NULL if the number of users and roles exceeds 32,767.
[Column("uid")]
[Nullable]
public short? UID { get; set; }
Property Value
UseCounts
Number of times this cache object has been used since inception.
[Column("usecounts")]
[NotNull]
public int UseCounts { get; set; }