Re: Report what tables or columns being used and how often.

From: Jeremy Smith <godtoall_at_hotmail.com>
Date: Thu, 18 Sep 2008 12:57:11 -0700 (PDT)
Message-ID: <484fedaf-1a28-475c-b016-821ed3a7342b@a18g2000pra.googlegroups.com>


Thanks this was exactly what I was looking for.

select distinct oo.name owner,

    o.name table_name,
    c.name column_name,
     u.equality_preds,

    u.equijoin_preds,
    u.nonequijoin_preds,
    u.range_preds,
    u.like_preds,
    u.null_preds,
    u.timestamp
from    sys.obj$ o
        left join sys.col_usage$ u on o.obj# = u.obj#
    inner join sys.user$ oo on oo.user# = o.owner#     inner join sys.col$ c on c.obj# = u.obj# and c.col# = u.intcol# where oo.name not in
('SYS','SYSTEM','OUTLN','DBSNMP','WMSYS','PERFSTAT','TOAD','SYSMAN','PERFSTAT9I'
                    ,'PUBLIC','TSMSYS')

order by 1,2,3 Received on Thu Sep 18 2008 - 14:57:11 CDT

Original text of this message