sp_iqcolumnuse Procedure

Reports detailed usage information for columns accessed by the workload.

Syntax

sp_iqcolumnuse 

Permissions

DBA authority required. Users without DBA authority must be granted EXECUTE permission to run the stored procedure.

Description

Columns from tables created in SYSTEM are not reported.

sp_iqcolumnuse columns

Column name

Description

TableName

Table name

ColumnName

Column name

Owner

User name of column owner

UID**

Column Unique Identifier

LastDT

Date/time of last access

NRef

Number of query references

**UID is a number assigned by the system that uniquely identifies the instance of the column (where instance is defined when an object is created).

For more information on column indexes, see Reference: Statements and Options > Database Options, Alphabetical List of Options > INDEX_ADVISOR option.

Example

Sample output from the sp_iqcolumnuse procedure:

TableName       ColumnName     Owner   UID             LastDT               NRef 
orders          o_orderdate    DBA                151   20070917 22:41:22..  13
orders          o_shippriority DBA                154   20070917 22:41:22..  13
lineitem        l_orderkey     DBA                186   20070917 22:41:22..  13
lineitem        l_extendedp..  DBA                191   20070917 22:41:22..  13
lineitem        l_discount     DBA                192   20070917 22:41:22..  13
lineitem        l_shipdate     DBA                196   20070917 22:41:22..  13
#tmp1           expression     DBA     10000000001218   20070917 22:57:36..   1
#tmp1           expression     DBA     10000000001222   20070917 22:41:58..   1
...
Note: The long numbers in the example above are temporary IDs.
Related reference
sp_iqindexadvice Procedure
sp_iqindexuse Procedure
sp_iqtableuse Procedure
sp_iqunusedcolumn Procedure
sp_iqunusedindex Procedure
sp_iqunusedtable Procedure
sp_iqworkmon Procedure