$hist_table_access_n
The $hist_table_access_n table records the table access history for a query. This table becomes enabled whenever history type is Table.
| Name | Type | Description |
|---|---|---|
| npsid | integer | This value along with the npsInstanceId and opid form the foreign key into the operation table. |
| npsinstanceid | integer | Instance ID of the source system |
| opid | bigint | Operation ID. Used as a foreign key from query epilog, overflow and plan, table, column access tables to query prolog. |
| logentryid | bigint | This ID and the NPS ID (npsid) and instance
ID (npsinstanceid) form:
|
| seqid | integer | A plain sequence number of the entry. It starts at zero for every npsid, npsinstanceid, and opid. It increments monotonically for table access records for each query. |
| sessionid | bigint | Session ID. This ID with NPS ID (npsid) and instance ID (npsinstanceid) form the foreign key from query, plan, table, and column access tables into session tables. |
| dbid | bigint | OID of the database where the table is defined |
| dbname | nvarchar(128) | The name of the database where the table is defined |
| schemaid | bigint | The OID of the schema as specified in catalog.schema.table |
| schemaname | nvarchar(128) | The schema name as specified in catalog.schema.table |
| tableid | bigint | The table id of the table |
| tablename | nvarchar(128) | The table name of the table |
| usage | integer | The following bits are set to true if table appears in:
|