Re: Table last access date?

  • From: "John Kanagaraj" <john.kanagaraj@xxxxxxxxx>
  • To: yong321@xxxxxxxxx
  • Date: Fri, 21 Nov 2008 22:23:16 -0800

Hi Jeremy,

How about using COL_USAGE$. I wrote up a reply oh-so long ago on a
slightly different question. See this link:

//www.freelists.org/post/oracle-l/re-CBO-A-Configuration-Roadmap-Histograms-on-NonIndexed-Columns,6

I wrote this to figure out to determine which columns are used in
predicates. You can easily adopt this SQL to determine if some SQL
statement with columns from this was parsed. The timestamp will show
when any SQL that used that table was last hard parsed.

Something to check: Better than using V$SQL (which could get flushed)
or STATSPACK (if this was not high up in Top SQL, it may not be
caught). The only caveat? If there was no WHERE clause in SQLs against
that table, it will not show up. However, this is a remote possibility
as most SQL will have some form of filter or access predicates.

-- 
John Kanagaraj <><
http://www.linkedin.com/in/johnkanagaraj
http://jkanagaraj.wordpress.com (Sorry - not an Oracle blog!)
** The opinions and facts contained in this message are entirely mine
and do not reflect those of my employer or customers **
--
//www.freelists.org/webpage/oracle-l


Other related posts: