Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Query on all_tables taking long time
Hi,
We have a function that checks if the table exists in current schema if specified without the schema name or all_tables if we specify the table name as object_name.table_name and it looks like query against all_tables is running very slow. Following is the output from the tkprof and it is not clear why optimizer is using 18 sec for cpu and doing 134k reads. This is 10.2.0.1 on RHAT ENT 4
SELECT COUNT(1)
FROM
ALL_TABLES WHERE OWNER || '.' || TABLE_NAME = UPPER(:B1 )
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ----------
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 172 (recursive depth: 1)
Thanks
--Harvinder
--
http://www.freelists.org/webpage/oracle-l
Received on Wed May 09 2007 - 15:17:52 CDT
![]() |
![]() |