 |
|
DBA_UNUSED_COL_TABS view tips
Oracle Tips by Burleson Consulting |
DBA_UNUSED_COL_TABS
<< Return to the index
Oracle 11g makes the following comments about the DBA_UNUSED_COL_TABS table: "All tables with unused columns in the database"
Related notes on DBA_UNUSED_COL_TABS:
Column description of the DBA_UNUSED_COL_TABS view:OWNERDescription of DBA_UNUSED_COL_TABS.OWNER: "Owner of the table" TABLE_NAMEDescription of DBA_UNUSED_COL_TABS.TABLE_NAME: "Name of the table" COUNTDescription of DBA_UNUSED_COL_TABS.COUNT: "Number of unused columns in table"
DBA_UNUSED_COL_TABS View SourceOracle 11g's data dictionary defines the DBA_UNUSED_COL_TABS view using the following source query:
select u.name, o.name, count(*)
from sys.user$ u, sys.obj$ o, sys.col$ c
where c.obj# = o.obj#
and bitand(c.property,32768) = 32768 -- is unused column
and bitand(c.property, 1) != 1 -- not ADT attribute col
and bitand(c.property, 1024) != 1024 -- not NTAB's setid col
and u.user# = o.owner#
group by u.name, o.name
 |
If you like Oracle tuning, see the book "Oracle
Tuning: The Definitive Reference", with 950 pages of tuning tips and
scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |
 |
 |
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|