Professional Documents
Culture Documents
Sizing Check v1
Sizing Check v1
Sizing Check v1
BEGIN
DECLARE num_of_schema double;
DECLARE header_count double;
DECLARE line_count double;
DECLARE initial_memory double =36;
DECLARE concurrent_users int;
DECLARE schema_memory double;
DECLARE data_memory double;
DECLARE max_memory double;
DECLARE CURSOR curs1 for
select schema_name, table_name
from public.tables
where SCHEMA_NAME in (select schema_name from PUBLIC.TABLES
WHERE TABLE_NAME='CINF')
and table_name in
('OINV','ORDR','OQUT','ODLN','OPCH','OPDN','OPOR','ORCT','OVPM','OIGE','OIGN','OWTR
',
'INV1','RDR1','QUT1','DLN1','PCH1','PDN1','POR1','RCT2','VPM2','IGE1','IGN1','WTR1'
);
--LOAD tables
for cur_row as curs1()
do
exec 'load "'|| cur_row.SCHEMA_NAME ||'"."' || cur_row.TABLE_NAME ||'"
all';
end for;
IF :schema_memory>:data_memory
THEN
max_memory=:schema_memory;
ELSE
max_memory=:data_memory;
END IF;