-------------------------------------------------------------------------------
-- E.Gallas April 5, 2002
-- 
-- This file contains queries to get the counts of the number
-- of elements of various types in the trigger database.
-- The counts reported below for the table rows, 
--   and application views, tables, synonymns, constraints, triggers
--   were recorded on April 5, 2002.
-- Revised counts on June 19, 2002 (after global 7.40 entry)
-------------------------------------------------------------------------------
set echo on;
set linesize 256;
set pagesize 000;

select count(*) from TL_TO_EDS;
-- 1
select count(*) from TL_MAPS;
-- 36876
select count(*) from TRIGGER_LISTS;
-- 303
select count(*) from TRIGGER_NAMES;
-- 3074
pause
-- Scripts ------------------------------------------------
select count(*) from L1S_ORDER_NS;
-- 2684
select count(*) from L1_SCRIPTS;
-- 530
select count(*) from L2S_ORDER_GS;
-- 348
select count(*) from L2_SCRIPTS;
-- 240
select count(*) from L3S_ORDER_FS;
-- 2393
select count(*) from L3_SCRIPTS;
-- 1070
pause
-- l3 objects and terms ----------------------------------------
select count(*) from L3_VALUES;
-- 8003
select count(*) from L3_TERMS;
-- 1104
select count(*) from L3_PARS;
-- 918
select count(*) from L3_OBJECTS;
-- 177
pause
-- l2 preprocessors --------------------------------------------
select count(*) from L2PP_TO_GS;
-- 12
select count(*) from L2PP_PARS;
-- 10
select count(*) from L2PPS;
-- 8
pause
-- l2 objects and terms ----------------------------------------
select count(*) from L2_VALUES;
-- 1777
select count(*) from L2_GLOBALS;
-- 342
select count(*) from L2_PARS;
-- 224
select count(*) from L2_OBJECTS;
-- 64
pause
-- l1 hardware, firmware, simulation tables --------------------
select count(*) from L1_DIALOGS;
-- 121
select count(*) from NEOTERM_TERMS;
-- 930
select count(*) from NTY_ATTRIBUTES;
-- 43
select count(*) from NTB_COMPONENTS;
-- 0
select count(*) from NTY_BOARDS;
-- 0
select count(*) from NTY_SIMS;
-- 2
select count(*) from NEOTERMS;
-- 918
select count(*) from NEOTYPES;
-- 23
pause
-- l1 objects and terms ----------------------------------------
select count(*) from L1_VALUES;
-- 2689
select count(*) from L1_TERMS;
-- 669
select count(*) from L1_PARS;
-- 117
select count(*) from L1_OBJECTS;
-- 65
pause
-- exposures and crates ----------------------------------------
select count(*) from EXPOSURE_TO_EDS;
-- 132
select count(*) from ED_ATTRIBUTES;
-- 48
select count(*) from ENGAGED_DEVICES;
-- 121
select count(*) from EXPOSURES;
-- 9
-- users and roles ---------------------------------------------
select count(*) from T_USERS;
-- 13 
select count(*) from T_USER_ROLES;
-- 22
pause


select count(*) from user_views;
-- 33
select count(*) from user_tables;
-- 43
select count(*) from all_synonyms where table_owner like '%TRIGGER_OWNER%';
-- 0 after import
-- 117 after executing .syn file and running handwritten.vw 
select count(*) from user_constraints;
-- 419
select count(*) from user_triggers;
-- 34
select * from user_sequences;
-- 0
pause

select synonym_name,table_owner,table_name
	from all_synonyms where table_owner like '%TRIGGER_OWNER%'
	order by table_name,synonym_name;
pause
