Categorized | Tuning

Find Full Table Scans

This query provides a list of queries (1,000 characters only) involved in full table scans. The total number of rows and blocks for each table is also displayed so that you can determine whether the full scan is degrading performance.

select sp.object_owner,sp.object_name,
(select sql_text from v$sqlarea sa
where sa.address = sp.address
and sa.hash_value =sp.hash_value) sqltext,
(select executions from v$sqlarea sa
where sa.address = sp.address
and sa.hash_value =sp.hash_value) no_of_full_scans,
(select lpad(nvl(trim(to_char(num_rows)),' '),15,' ')||' | '||lpad(nvl(trim(to_char(blocks)),' '),15,' ')||' | '||buffer_pool
from dba_tables where table_name = sp.object_name
and owner = sp.object_owner) "rows|blocks|pool"
from v$sql_plan sp
where operation='TABLE ACCESS'
and options = 'FULL'
and object_owner IN ()
order by 1,2;

Author Profile

sysdba ;

Other posts by sysdba

Author's web site



Are you satisfied with this blog?
Why not subscribe our RSS Feed? you will always get the latest post.


Hi, Be the first leave some reply

Leave A Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>




4 visitors online now
4 guests, 0 members
Max visitors today: 4 at 11:44 pm CET
This month: 7 at 03-08-2010 09:18 pm CET
This year: 13 at 02-28-2010 05:55 am CET
All time: 14 at 12-23-2009 11:57 am CET