sys.syscacheobjects (Transact-SQL)sys.syscacheobjects (Transact-SQL)
適用対象:Applies to: SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
SQL ServerSQL Server (サポートされているすべてのバージョン)
SQL ServerSQL Server (all supported versions)
キャッシュの使用方法に関する情報が含まれています。Contains information about how the cache is used.
重要
この SQL Server 2000 システム テーブルは、下位互換性を保つためにビューとして含まれています。This SQL Server 2000 system table is included as a view for backward compatibility. 代わりに、現在の SQL Server システム ビューを使用することをお勧めします。We recommend that you use the current SQL Server system views instead. 対応するシステム ビューを調べるには、「システム テーブルのシステム ビューへのマッピング (Transact-SQL)」をご覧ください。To find the equivalent system view or views, see Mapping System Tables to System Views (Transact-SQL). この機能は、Microsoft SQL Server の将来のバージョンで削除されます。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.
列名Column name | データ型Data type | 説明Description |
---|---|---|
bucketidbucketid | intint | バケット ID です。Bucket ID. 値は 0 ~ディレクトリ サイズ -1 の範囲を示します。Value indicates a range from 0 through (directory size - 1). ディレクトリサイズは、ハッシュテーブルのサイズです。Directory size is the size of the hash table. |
cacheobjtypecacheobjtype | nvarchar(17)nvarchar(17) | キャッシュ内のオブジェクトの種類です。Type of object in the cache: コンパイル済みプランCompiled plan 実行プランExecutable plan 解析ツリーParse tree カーソルCursor 拡張ストアド プロシージャExtended stored procedure |
objtypeobjtype | nvarchar(8)nvarchar(8) | オブジェクトの種類:Type of object: ストアド プロシージャStored procedure 準備済みステートメントPrepared statement アドホッククエリ ( Transact-SQLTransact-SQL リモートプロシージャコールではなく、 sqlcmd ユーティリティまたは osql ユーティリティから言語イベントとして送信されます)Ad hoc query (Transact-SQLTransact-SQL submitted as language events from the sqlcmd or osql utilities, instead of remote procedure calls) ReplProc (レプリケーションプロシージャ)ReplProc (replication procedure) トリガーTrigger 表示View 既定Default ユーザー テーブルUser table システム テーブルSystem table ○Check ルールRule |
objidobjid | intint | キャッシュ内のオブジェクトを検索するために使用される主キーの1つ。One of the main keys used for looking up an object in the cache. これは、データベースオブジェクト (プロシージャ、ビュー、トリガーなど) の sysobjects に格納されているオブジェクト ID です。This is the object ID stored in sysobjects for database objects (procedures, views, triggers, and so on). アドホックまたは準備された SQL などのキャッシュオブジェクトの場合、 objid は内部で生成された値です。For cache objects such as ad hoc or prepared SQL, objid is an internally generated value. |
dbiddbid | smallintsmallint | キャッシュオブジェクトがコンパイルされたデータベース ID。Database ID in which the cache object was compiled. |
dbidexecdbidexec | smallintsmallint | クエリ実行元となるデータベース ID です。Database ID from which the query is executed. ほとんどのオブジェクトでは、 dbidexec の値は dbid と同じです。For most objects, dbidexec has the same value as dbid. システムビューの場合、 dbidexec は、クエリの実行元のデータベース ID です。For system views, dbidexec is the database ID from which the query is executed. アドホッククエリの場合、 dbidexec は0です。For ad hoc queries, dbidexec is 0. つまり、 dbidexec の値は dbid と同じになります。This means dbidexec has the same value as dbid. |
uiduid | smallintsmallint | アドホックなクエリ プランおよび使用可能になったプランのプラン作成者です。Indicates the creator of the plan for ad hoc query plans and prepared plans. -2 は、送られたバッチが暗黙的な名前解決に依存せず、複数ユーザー間での共有が可能なことを示します。-2 = The batch submitted does not depend on implicit name resolution and can be shared among different users. 可能であればこの方法の使用をお勧めします。This is the preferred method. 他の値は、データベースのクエリを送っているユーザーのユーザー ID を示します。Any other value represents the user ID of the user submitting the query in the database. ユーザーおよびロールの数が32767を超えた場合、オーバーフローまたは NULL を返します。Overflows or returns NULL if the number of users and roles exceeds 32,767. |
refcountsrefcounts | intint | このキャッシュオブジェクトを参照している他のキャッシュオブジェクトの数。Number of other cache objects referencing this cache object. 1 は基になるオブジェクトであることを示します。A count of 1 is the base. |
usecountsusecounts | intint | このキャッシュ オブジェクトが最初の時点から使用された回数です。Number of times this cache object has been used since inception. |
使用されたものpagesused | intint | キャッシュ オブジェクトによって使用されたページ数です。Number of pages consumed by the cache object. |
setoptssetopts | intint | コンパイル済みプランに影響する SET オプションの設定です。SET option settings that affect a compiled plan. この設定は、キャッシュ キーの一部です。These settings are part of the cache key. この列の値を変更すると、ユーザーが SET オプションを変更したことを示します。Changes to values in this column indicate users have modified SET options. ポリシーで設定できるオプションは、次のとおりです。These options include the following: ANSI_PADDINGANSI_PADDING FORCEPLANFORCEPLAN CONCAT_NULL_YIELDS_NULLCONCAT_NULL_YIELDS_NULL ANSI_WARNINGSANSI_WARNINGS ANSI_NULLSANSI_NULLS QUOTED_IDENTIFIERQUOTED_IDENTIFIER ANSI_NULL_DFLT_ONANSI_NULL_DFLT_ON ANSI_NULL_DFLT_OFFANSI_NULL_DFLT_OFF |
langidlangid | smallintsmallint | 言語 ID。Language ID. キャッシュオブジェクトを作成した接続の言語の ID。ID of the language of the connection that created the cache object. |
dateformatdateformat | smallintsmallint | キャッシュオブジェクトを作成した接続の日付形式。Date format of the connection that created the cache object. |
statusstatus | intint | キャッシュ オブジェクトがカーソル プランであるかどうかを示します。Indicates whether the cache object is a cursor plan. 現時点では、最下位ビットのみが使用されます。Currently, only the least significant bit is used. |
lasttimelasttime | bigintbigint | これは旧バージョンとの互換性のためにだけ用意されています。For backward compatibility only. 常に 0 を返します。Always returns 0. |
maxexectimemaxexectime | bigintbigint | これは旧バージョンとの互換性のためにだけ用意されています。For backward compatibility only. 常に 0 を返します。Always returns 0. |
avgexectimeavgexectime | bigintbigint | これは旧バージョンとの互換性のためにだけ用意されています。For backward compatibility only. 常に 0 を返します。Always returns 0. |
lastreadslastreads | bigintbigint | これは旧バージョンとの互換性のためにだけ用意されています。For backward compatibility only. 常に 0 を返します。Always returns 0. |
lastwriteslastwrites | bigintbigint | これは旧バージョンとの互換性のためにだけ用意されています。For backward compatibility only. 常に 0 を返します。Always returns 0. |
sqlbytessqlbytes | intint | プロシージャの定義または送信済みバッチのバイト長です。Length in bytes of the procedure definition or batch submitted. |
sqlsql | nvarchar(3900)nvarchar(3900) | モジュール定義、または送信されたバッチの最初の3900文字。Module definition or the first 3900 characters of the batch submitted. |