Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: full table scans
John Dunn wrote:
>
> How can I find out what queries and/or tables are being used in full table
> scans?
>
> John
Select query text from V$SQLAREA (or, better, V$SQLTEXT since V$SQLAREA only contains the first 999 characters) and run EXPLAIN on it. Querying PLAN_TABLE afterwards will give you the info (do not forget to assign statement identifiers when running EXPLAIN). This is not too difficult to code in SQL or PL/SQL. This said, full table scans are not necessarily bad. Most reference tables are usually accessed faster through FTS, and sometimes big tables too. Only Big Bad Full Table Scans are to be feared; it really depends. You should concentrate on queries which do a high number of logical reads. There is a free script (peep.sql) on the Oriole site to find them. <PLUG>There is also a product, ORISNOOP, to give you a fuller picture and generate a usually awesome HTML report</PLUG>.
-- Regards, Stephane Faroult Oriole Corporation ------------------------------------------------------------------ http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs ------------------------------------------------------------------ -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Stephane Faroult INET: sfaroult_at_oriolecorp.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Jul 23 2001 - 04:18:27 CDT
![]() |
![]() |