Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question about detecting queries
ExecMan wrote:
> Hi,
>
> We have a real poorly put together database. It has over 900 tables
> and over 20 schemas. I want to start to get rid of everything that is
> not needed and merge the schemas into one.
>
> One thing I need to know is which tables are used and which are not.
>
> Is there a way to detect when a query is done to a table? This will
> tell me if the table is used or not........
>
> Thanks!
>
Take a look at the V$SEGMENT_STATISTICS view. This will give you logical and physical reads for your segments (i.e. tables and indexes). If a table has a physical read, or a subsequent logical read, then you know someone queried it.
HTH,
Brian
-- =================================================================== Brian Peasland dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Mon Jan 22 2007 - 13:20:33 CST