DBA Hub

📋Steps in this guide1/1

Find column usage statistics

set lines 150 set pages 500 col table_name for a20 col column_name for a20 select a.object_name table_name, c.column_name,equality_preds, equijoin_preds, range_preds, like_preds from dba_objects a, col_usage$ b, dba_tab_columns c where a.object_id=b.OBJ# and c.COLUMN_ID=b.INTCOL# and a.object_name=c.table_name and b.obj#=a.object_id and a.object_name='&table_name' and a.object_type='TABLE' and a.o

oracle configurationintermediate
by OracleDba
13 views
1

Find column usage statistics

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
set lines 150
set pages 500
col table_name for a20
col column_name for a20
select a.object_name table_name, c.column_name,equality_preds, equijoin_preds, range_preds, like_preds
from dba_objects a, col_usage$ b, dba_tab_columns c
where a.object_id=b.OBJ#
and c.COLUMN_ID=b.INTCOL#
and a.object_name=c.table_name
and b.obj#=a.object_id
and a.object_name='&table_name'
and a.object_type='TABLE'
and a.owner='&owner'
order by 3 desc,4 desc, 5 desc;

Comments (0)

Please to add comments

No comments yet. Be the first to comment!