-- Report on top 10 procedures with respect to usage.
-- with special thanks to Jeffrey M. Hunter from idevelopment.info

SELECT ptyp, obj, 0 - exem noe
  FROM (select distinct exem, ptyp, obj
          from (select o.type ptyp,
                       o.owner || '.' || o.name obj,
                       0 - o.executions exem
                  from v$db_object_cache O
                 where o.type in ('FUNCTION', 'PACKAGE', 'PACKAGE BODY',
                        'PROCEDURE', 'TRIGGER')))
 WHERE rownum <= 10;
-------------------------------------------------------------------