>>
>>obey TESTMV654(SET_UP);
>>---------------------------------------------------------------
>>
>>set schema catmvs.mvschm;

--- SQL operation complete.
>>
>>create table Num_Obj(schema_name CHARACTER(50), num_of_objects int);

--- SQL operation complete.
>>ALTER TABLE Num_Obj attribute all mvs allowed;

--- SQL operation complete.
>>set param ?schema_name 'MVSCHM';
>>obey INSERT_NUM_OF_OBJ;
>>insert into catmvs.mvschm.Num_Obj
+>select Substring(schemata.SCHEMA_NAME,1,20) as SCHEMA_NAME,
+>	count(objects.object_uid)  num_of_objcets
+>from HP_DEFINITION_SCHEMA.objects objects,
+>     HP_SYSTEM_CATALOG.SYSTEM_SCHEMA.SCHEMATA SCHEMATA
+>     where schemata.schema_uid = objects.schema_uid
+>     and objects.OBJECT_NAME_SPACE <> 'CN'and ?schema_name =SCHEMA_NAME
+>group by SCHEMA_NAME;

--- 1 row(s) inserted.
>>
>>create mvgroup MVG1_654;

--- SQL operation complete.
>>
>>create table T_654_T1(	a int not null not droppable,
+>						b int ,
+>						c int not null not droppable,
+>						d int not null not droppable,
+>					primary key (d asc, a desc))
+>					store by primary key;

--- SQL operation complete.
>>ALTER TABLE T_654_T1 attribute all mvs allowed;

--- SQL operation complete.
>>
>>
>>create table T_654_T2(	a int not null not droppable,
+>					    b int ,
+>						c int not null not droppable,
+>						d int not null not droppable,
+>					primary key (d desc, a asc))
+>					store by primary key;

--- SQL operation complete.
>>ALTER TABLE T_654_T2 attribute all mvs allowed;

--- SQL operation complete.
>>
>>create table temp1_654 (a int  not null not droppable, b int , c int,d int  not null not droppable,
+>							primary key (d asc, a desc));

--- SQL operation complete.
>>ALTER TABLE temp1_654 attribute all mvs allowed;

--- SQL operation complete.
>>create table temp2_654 (a int  not null not droppable, b int , c int,d int  not null not droppable,
+>							primary key (d desc, a asc));

--- SQL operation complete.
>>ALTER TABLE temp2_654 attribute all mvs allowed;

--- SQL operation complete.
>>
>>create mv T_654_MV1_a
+>	refresh on request 
+>	initialize on create 
+>	as
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a;

--- SQL operation complete.
>>ALTER MV T_654_MV1_a attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV1_a;

--- SQL operation complete.
>>
>>create mv T_654_MV2_a
+>	refresh on request 
+>	initialize on create 
+>	as
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a;

--- SQL operation complete.
>>ALTER MV T_654_MV2_a attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV2_a;

--- SQL operation complete.
>>
>>
>>create mv T_654_MV1_mtx
+>	refresh on request 
+>	initialize on create
+>	MVAttributes COMMIT Refresh EACH 5 
+>	as
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a;

--- SQL operation complete.
>>ALTER MV T_654_MV1_mtx attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV1_mtx;

--- SQL operation complete.
>>
>>create mv T_654_MV2_mtx
+>	refresh on request 
+>	initialize on create
+>	MVAttributes COMMIT Refresh EACH 5 
+>	as
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a;

--- SQL operation complete.
>>ALTER MV T_654_MV2_mtx attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup  MVG1_654 add T_654_MV2_mtx;

--- SQL operation complete.
>>
>>create mv T_654_MV1_min
+>	refresh on request 
+>	initialize on create
+>	as
+>	select a,d,min(b) min_b
+>	from T_654_T1
+>	group by d,a;

--- SQL operation complete.
>>ALTER MV T_654_MV1_min attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV1_min;

--- SQL operation complete.
>>
>>
>>create mv T_654_MV2_min
+>	refresh on request 
+>	initialize on create
+>	as
+>	select a,d,min(b) min_b
+>	from T_654_T2
+>	group by d,a;

--- SQL operation complete.
>>ALTER MV T_654_MV2_min attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV2_min;

--- SQL operation complete.
>>
>>
>>create mv T_654_MV3_min
+>	refresh on request 
+>	initialize on create
+>	as
+>	select a,c,min(b) min_b
+>	from T_654_T1
+>	group by c,a;

--- SQL operation complete.
>>ALTER MV T_654_MV3_min attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV3_min;

--- SQL operation complete.
>>
>>create mv T_654_MV4_min
+>	refresh on request 
+>	initialize on create
+>	as
+>	select a,c,min(b) min_b
+>	from T_654_T2
+>	group by c,a;

--- SQL operation complete.
>>ALTER MV T_654_MV4_min attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV4_min;

--- SQL operation complete.
>>
>>
>>create mv T_654_MV_mdelta
+>	refresh on request 
+>	initialize on create
+>	as
+>	select T_654_T1.a , T_654_T2.d, T_654_T1.b, sum(T_654_T1.c) sum_c
+>	from T_654_T1,T_654_T2
+>	where T_654_T1.a=T_654_T2.a
+>	group by T_654_T1.a,T_654_T2.d,T_654_T1.b;

*** WARNING[12112] A secondary index CATMVS.MVSCHM.T_654_MV_MDELTA_534234433_4588 was created for the materialized view.

--- SQL operation completed with warnings.
>>ALTER MV T_654_MV_mdelta attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV_mdelta;

--- SQL operation complete.
>>
>>create mv T_654_MV1_pipe
+>	refresh on request 
+>	initialize on create
+>	as
+>	select a,c,d, sum(b) sb
+>	from T_654_T1
+>	group by a,d,c;

--- SQL operation complete.
>>ALTER MV T_654_MV1_pipe attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV1_pipe;

--- SQL operation complete.
>>
>>create mv T_654_MV2_pipe
+>	refresh on request 
+>	initialize on create
+>	as
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV1_pipe
+>	group by a,sb;

*** WARNING[12112] A secondary index CATMVS.MVSCHM.T_654_MV2_PIPE_432542143_4588 was created for the materialized view.

--- SQL operation completed with warnings.
>>ALTER MV T_654_MV2_pipe attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV2_pipe;

--- SQL operation complete.
>>
>>create mv T_654_MV3_pipe
+>	refresh on request 
+>	initialize on create
+>	as
+>	select a,c,d, sum(b) sb
+>	from T_654_T2
+>	group by a,d,c;

--- SQL operation complete.
>>ALTER MV T_654_MV3_pipe attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV3_pipe;

--- SQL operation complete.
>>
>>create mv T_654_MV4_pipe
+>	refresh on request 
+>	initialize on create
+>	as
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV3_pipe
+>	group by a,sb;

*** WARNING[12112] A secondary index CATMVS.MVSCHM.T_654_MV4_PIPE_355432743_4588 was created for the materialized view.

--- SQL operation completed with warnings.
>>ALTER MV T_654_MV4_pipe attribute all mvs allowed;

--- SQL operation complete.
>>ALTER MVGroup MVG1_654 add T_654_MV4_pipe;

--- SQL operation complete.
>>
>>
>>prepare select_from_log_of_T1 from
+>	select "@EPOCH", 
+>		   case "@OPERATION_TYPE" when  0 then 'INSERT'
+>		                          when  4 then 'END-RANGE'
+>		                          when 12 then 'BEGIN-RANGE'
+>		   					else         '???'
+>		   end,
+>		   d,a
+>	from table (iud_log_table T_654_T1)
+>	order by d asc, a desc, "@TS";

--- SQL command prepared.
>>
>>prepare select_from_log_of_T2 from
+>	select "@EPOCH", 
+>		   case "@OPERATION_TYPE" when  0 then 'INSERT'
+>		                          when  4 then 'END-RANGE'
+>		                          when 12 then 'BEGIN-RANGE'
+>		   					else         '???'
+>		   end,
+>		   d,a
+>	from table (iud_log_table T_654_T2)
+>	order by d desc, a asc, "@TS";

--- SQL command prepared.
>>
>>
>>-------------------------------------------------------
>>
>>-- Run Tests
>>
>>	obey TESTMV654(SINGLE_ROW);
>>-------------------------------------------------------
>>insert into T_654_T1 values
+>	(1,2,3,4),(2,3,4,5),(1,5,3,3),(4,12,22,22),(2,12,22,44), (15,3,4,2);

--- 6 row(s) inserted.
>>
>>insert into T_654_T2 values
+>	(1,2,3,4),(2,3,4,5),(1,5,4,3),(4,12,22,22),(2,12,22,44), (15,3,4,2);

--- 6 row(s) inserted.
>>
>>execute select_from_log_of_T1;

@EPOCH       (EXPR)       D            A          
-----------  -----------  -----------  -----------

        106  INSERT                 2           15
        106  INSERT                 3            1
        106  INSERT                 4            1
        106  INSERT                 5            2
        106  INSERT                22            4
        106  INSERT                44            2

--- 6 row(s) selected.
>>execute select_from_log_of_T2;

@EPOCH       (EXPR)       D            A          
-----------  -----------  -----------  -----------

        106  INSERT                44            2
        106  INSERT                22            4
        106  INSERT                 5            2
        106  INSERT                 4            1
        106  INSERT                 3            1
        106  INSERT                 2           15

--- 6 row(s) selected.
>>
>>refresh mvgroup MVG1_654 outfile REFRESH.LOG ;

--- SQL operation complete.
>>log;




































Finished the log cleanup of table CATMVS.MVSCHM.T_654_MV1_PIPE.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_MV3_PIPE.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_T1.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_T2.
Starting the log cleanup of table CATMVS.MVSCHM.T_654_MV1_PIPE...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_MV3_PIPE...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_T1...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_T2...
The materialized view CATMVS.MVSCHM.T_654_MV1_A has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_A is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_MTX has been refreshed in 3 transaction(s).
The materialized view CATMVS.MVSCHM.T_654_MV1_MTX is being refreshed in multiple transactions...
The materialized view CATMVS.MVSCHM.T_654_MV1_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_A has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_A is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_MTX has been refreshed in 3 transaction(s).
The materialized view CATMVS.MVSCHM.T_654_MV2_MTX is being refreshed in multiple transactions...
The materialized view CATMVS.MVSCHM.T_654_MV2_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV3_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV3_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV3_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV3_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV4_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV4_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV4_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV4_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV_MDELTA has been refreshed from 2 deltas in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV_MDELTA is being refreshed in a single transaction...
>>
>>obey TESTMV654(COMPARE_MVS);
>>--------------------------------------------------------
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV1_a
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV2_a
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV1_mtx
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV2_mtx
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,d,min(b) min_b
+>	from T_654_T1
+>	group by d,a
+>	order by d,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV1_min
+>	order by d,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,d,min(b) min_b
+>	from T_654_T2
+>	group by d,a
+>	order by d,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV2_min
+>	order by d,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,min(b) min_b
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV3_min
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,min(b) min_b
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV4_min
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select T_654_T1.a , T_654_T2.d, T_654_T1.b, sum(T_654_T1.c) sum_c
+>	from T_654_T1,T_654_T2
+>	where T_654_T1.a=T_654_T2.a
+>	group by T_654_T1.a,T_654_T2.d,T_654_T1.b
+>	order by a,d,b;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV_mdelta
+>	order by a,d,b;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,c,d, sum(b) sb
+>	from T_654_T1
+>	group by a,d,c
+>	order by a,d,c;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV1_pipe
+>	order by a,d,c;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV1_pipe
+>	group by a,sb
+>	order by a,sb;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV2_pipe
+>	order by a,sb;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,c,d, sum(b) sb
+>	from T_654_T2
+>	group by a,d,c
+>	order by a,d,c;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV3_pipe
+>	order by a,d,c;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>
>>PREPARE stat1 FROM
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV3_pipe
+>	group by a,sb
+>	order by a,sb;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV4_pipe
+>	order by a,sb;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>
>>--------------------------------------------------------
>>
>>-------------------------------------------------------
>>	obey TESTMV654(VSBB_INSERT);
>>-------------------------------------------------------
>>delete from T_654_T1 where a=1 and b=2;

--- 1 row(s) deleted.
>>
>>insert into T_654_T1 values 
+>		(90,8,23,3),(90,7,23,4),(90,6,23,15),(90,6,23,16),
+>		(90,6,23,17),(90,6,23,18),(80,16,14,26),(80,34,14,27),
+>		(79,33,14,27),(4,11,22,34);

--- 10 row(s) inserted.
>>
>>insert into T_654_T2 values 
+>		(4,11,22,34),(79,33,14,27),(80,34,14,27),(80,16,14,26),(90,6,23,18),(90,6,23,17),
+>			(90,6,23,16),(90,6,23,15),(90,7,23,4);

--- 9 row(s) inserted.
>>
>>execute select_from_log_of_T1;

@EPOCH       (EXPR)       D            A          
-----------  -----------  -----------  -----------

        107  INSERT                 3           90
        107  INSERT                 4           90
        107  ???                    4            1
        107  INSERT                15           90
        107  INSERT                16           90
        107  INSERT                17           90
        107  INSERT                18           90
        107  INSERT                26           80
        107  INSERT                27           80
        107  INSERT                27           79
        107  INSERT                34            4

--- 11 row(s) selected.
>>execute select_from_log_of_T2;

@EPOCH       (EXPR)       D            A          
-----------  -----------  -----------  -----------

        107  INSERT                34            4
        107  INSERT                27           79
        107  INSERT                27           80
        107  INSERT                26           80
        107  INSERT                18           90
        107  INSERT                17           90
        107  INSERT                16           90
        107  INSERT                15           90
        107  INSERT                 4           90

--- 9 row(s) selected.
>>
>>refresh mvgroup MVG1_654 outfile REFRESH.LOG ;

--- SQL operation complete.
>>log;




































Finished the log cleanup of table CATMVS.MVSCHM.T_654_MV1_PIPE.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_MV3_PIPE.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_T1.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_T2.
Starting the log cleanup of table CATMVS.MVSCHM.T_654_MV1_PIPE...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_MV3_PIPE...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_T1...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_T2...
The materialized view CATMVS.MVSCHM.T_654_MV1_A has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_A is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_MTX has been refreshed in 4 transaction(s).
The materialized view CATMVS.MVSCHM.T_654_MV1_MTX is being refreshed in multiple transactions...
The materialized view CATMVS.MVSCHM.T_654_MV1_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_A has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_A is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_MTX has been refreshed in 4 transaction(s).
The materialized view CATMVS.MVSCHM.T_654_MV2_MTX is being refreshed in multiple transactions...
The materialized view CATMVS.MVSCHM.T_654_MV2_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV3_MIN has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV3_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV3_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV3_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV4_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV4_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV4_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV4_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV_MDELTA has been refreshed from 2 deltas in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV_MDELTA is being refreshed in a single transaction...
>>
>>obey TESTMV654(COMPARE_MVS);
>>--------------------------------------------------------
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV1_a
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV2_a
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV1_mtx
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV2_mtx
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,d,min(b) min_b
+>	from T_654_T1
+>	group by d,a
+>	order by d,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV1_min
+>	order by d,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,d,min(b) min_b
+>	from T_654_T2
+>	group by d,a
+>	order by d,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV2_min
+>	order by d,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,min(b) min_b
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV3_min
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,min(b) min_b
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV4_min
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select T_654_T1.a , T_654_T2.d, T_654_T1.b, sum(T_654_T1.c) sum_c
+>	from T_654_T1,T_654_T2
+>	where T_654_T1.a=T_654_T2.a
+>	group by T_654_T1.a,T_654_T2.d,T_654_T1.b
+>	order by a,d,b;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV_mdelta
+>	order by a,d,b;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,c,d, sum(b) sb
+>	from T_654_T1
+>	group by a,d,c
+>	order by a,d,c;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV1_pipe
+>	order by a,d,c;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV1_pipe
+>	group by a,sb
+>	order by a,sb;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV2_pipe
+>	order by a,sb;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,c,d, sum(b) sb
+>	from T_654_T2
+>	group by a,d,c
+>	order by a,d,c;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV3_pipe
+>	order by a,d,c;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>
>>PREPARE stat1 FROM
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV3_pipe
+>	group by a,sb
+>	order by a,sb;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV4_pipe
+>	order by a,sb;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>
>>--------------------------------------------------------
>>
>>-------------------------------------------------------
>>	obey TESTMV654(SIDEINSERT);
>>-------------------------------------------------------
>>
>>delete from T_654_T1;

--- 15 row(s) deleted.
>>delete from T_654_T2;

--- 15 row(s) deleted.
>>
>>refresh mvgroup MVG1_654 recompute outfile REFRESH.LOG ;

--- SQL operation complete.
>>log;




































Finished the log cleanup of table CATMVS.MVSCHM.T_654_MV1_PIPE.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_MV3_PIPE.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_T1.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_T2.
Starting the log cleanup of table CATMVS.MVSCHM.T_654_MV1_PIPE...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_MV3_PIPE...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_T1...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_T2...
The materialized view CATMVS.MVSCHM.T_654_MV1_A has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_A is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_MIN has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_MIN is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_MTX has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_MTX is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_PIPE has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_PIPE is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_A has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_A is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_MIN has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_MIN is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_MTX has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_MTX is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_PIPE has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_PIPE is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV3_MIN has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV3_MIN is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV3_PIPE has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV3_PIPE is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV4_MIN has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV4_MIN is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV4_PIPE has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV4_PIPE is being refreshed (by recompute) in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV_MDELTA has been refreshed (by recompute) in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV_MDELTA is being refreshed (by recompute) in a single transaction...
>>
>>obey TESTMV654(COMPARE_MVS);
>>--------------------------------------------------------
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV1_a
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV2_a
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV1_mtx
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV2_mtx
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,d,min(b) min_b
+>	from T_654_T1
+>	group by d,a
+>	order by d,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV1_min
+>	order by d,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,d,min(b) min_b
+>	from T_654_T2
+>	group by d,a
+>	order by d,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV2_min
+>	order by d,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,min(b) min_b
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV3_min
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,min(b) min_b
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV4_min
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select T_654_T1.a , T_654_T2.d, T_654_T1.b, sum(T_654_T1.c) sum_c
+>	from T_654_T1,T_654_T2
+>	where T_654_T1.a=T_654_T2.a
+>	group by T_654_T1.a,T_654_T2.d,T_654_T1.b
+>	order by a,d,b;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV_mdelta
+>	order by a,d,b;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,c,d, sum(b) sb
+>	from T_654_T1
+>	group by a,d,c
+>	order by a,d,c;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV1_pipe
+>	order by a,d,c;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV1_pipe
+>	group by a,sb
+>	order by a,sb;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV2_pipe
+>	order by a,sb;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,c,d, sum(b) sb
+>	from T_654_T2
+>	group by a,d,c
+>	order by a,d,c;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV3_pipe
+>	order by a,d,c;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>
>>PREPARE stat1 FROM
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV3_pipe
+>	group by a,sb
+>	order by a,sb;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV4_pipe
+>	order by a,sb;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>
>>--------------------------------------------------------
>>
>>
>>Insert into temp1_654
+>Values  (12,12,12,12),(13,23,23,11),(14,25,35,10),(15,24,56,6),
+>		(15,24,56,5),	(90,8,23,3),(90,7,23,4),(90,6,23,15),(90,6,23,16),
+>		(90,6,23,17),(90,6,23,18),(80,16,14,26),(80,34,14,27),
+>		(79,33,14,27),(4,11,22,34);

--- 15 row(s) inserted.
>>
>>
>>Insert into temp2_654
+>Values  (12,12,12,12),(13,23,23,11),(14,25,35,10),(15,24,56,6),
+>		(15,24,56,5),	(90,8,23,3),(90,7,23,4),(90,6,23,15),(90,6,23,16),
+>		(90,6,23,17),(90,6,23,18),(80,16,14,26),(80,34,14,27),
+>		(79,33,14,27),(4,11,22,34);

--- 15 row(s) inserted.
>>
>>set parserflags 1024;

--- SQL operation complete.
>> -- allow no audit
>>ALTER table T_654_T1 attribute no audit;

--- SQL operation complete.
>>ALTER table T_654_T2 attribute no audit;

--- SQL operation complete.
>>reset parserflags 1024;

--- SQL operation complete.
>>
>>insert using sideinserts into T_654_T1(a,b,c,d) select * from temp1_654 ;

--- 15 row(s) inserted.
>>insert using sideinserts into T_654_T2(a,b,c,d) select * from temp2_654 ;

--- 15 row(s) inserted.
>>
>>set parserflags 1024;

--- SQL operation complete.
>> -- allow no audit
>>ALTER table T_654_T1 attribute audit;

--- SQL operation complete.
>>ALTER table T_654_T2 attribute audit;

--- SQL operation complete.
>>reset parserflags 1024;

--- SQL operation complete.
>>
>>-- IUD LOG 
>>execute select_from_log_of_T1;

@EPOCH       (EXPR)       D            A          
-----------  -----------  -----------  -----------

        109  INSERT                 3           90
        109  INSERT                 4           90
        109  INSERT                 5           15
        109  INSERT                 6           15
        109  INSERT                10           14
        109  INSERT                11           13
        109  INSERT                12           12
        109  INSERT                15           90
        109  INSERT                16           90
        109  INSERT                17           90
        109  INSERT                18           90
        109  INSERT                26           80
        109  INSERT                27           80
        109  INSERT                27           79
        109  INSERT                34            4

--- 15 row(s) selected.
>>execute select_from_log_of_T2;

@EPOCH       (EXPR)       D            A          
-----------  -----------  -----------  -----------

        109  INSERT                34            4
        109  INSERT                27           79
        109  INSERT                27           80
        109  INSERT                26           80
        109  INSERT                18           90
        109  INSERT                17           90
        109  INSERT                16           90
        109  INSERT                15           90
        109  INSERT                12           12
        109  INSERT                11           13
        109  INSERT                10           14
        109  INSERT                 6           15
        109  INSERT                 5           15
        109  INSERT                 4           90
        109  INSERT                 3           90

--- 15 row(s) selected.
>>
>>refresh mvgroup MVG1_654 outfile REFRESH.LOG ;

--- SQL operation complete.
>>log;




































Finished the log cleanup of table CATMVS.MVSCHM.T_654_MV1_PIPE.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_MV3_PIPE.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_T1.
Finished the log cleanup of table CATMVS.MVSCHM.T_654_T2.
Starting the log cleanup of table CATMVS.MVSCHM.T_654_MV1_PIPE...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_MV3_PIPE...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_T1...
Starting the log cleanup of table CATMVS.MVSCHM.T_654_T2...
The materialized view CATMVS.MVSCHM.T_654_MV1_A has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_A is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV1_MTX has been refreshed in 5 transaction(s).
The materialized view CATMVS.MVSCHM.T_654_MV1_MTX is being refreshed in multiple transactions...
The materialized view CATMVS.MVSCHM.T_654_MV1_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV1_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_A has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_A is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV2_MTX has been refreshed in 5 transaction(s).
The materialized view CATMVS.MVSCHM.T_654_MV2_MTX is being refreshed in multiple transactions...
The materialized view CATMVS.MVSCHM.T_654_MV2_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV2_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV3_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV3_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV3_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV3_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV4_MIN has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV4_MIN is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV4_PIPE has been refreshed in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV4_PIPE is being refreshed in a single transaction...
The materialized view CATMVS.MVSCHM.T_654_MV_MDELTA has been refreshed from 2 deltas in a single transaction.
The materialized view CATMVS.MVSCHM.T_654_MV_MDELTA is being refreshed in a single transaction...
>>
>>obey TESTMV654(COMPARE_MVS);
>>--------------------------------------------------------
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV1_a
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV2_a
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV1_mtx
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,sum(b) sb
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from  T_654_MV2_mtx
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,d,min(b) min_b
+>	from T_654_T1
+>	group by d,a
+>	order by d,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV1_min
+>	order by d,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,d,min(b) min_b
+>	from T_654_T2
+>	group by d,a
+>	order by d,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV2_min
+>	order by d,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,min(b) min_b
+>	from T_654_T1
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV3_min
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM 
+>	select a,c,min(b) min_b
+>	from T_654_T2
+>	group by c,a
+>	order by c,a;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV4_min
+>	order by c,a;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select T_654_T1.a , T_654_T2.d, T_654_T1.b, sum(T_654_T1.c) sum_c
+>	from T_654_T1,T_654_T2
+>	where T_654_T1.a=T_654_T2.a
+>	group by T_654_T1.a,T_654_T2.d,T_654_T1.b
+>	order by a,d,b;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV_mdelta
+>	order by a,d,b;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,c,d, sum(b) sb
+>	from T_654_T1
+>	group by a,d,c
+>	order by a,d,c;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV1_pipe
+>	order by a,d,c;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV1_pipe
+>	group by a,sb
+>	order by a,sb;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV2_pipe
+>	order by a,sb;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>PREPARE stat1 FROM
+>	select a,c,d, sum(b) sb
+>	from T_654_T2
+>	group by a,d,c
+>	order by a,d,c;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV3_pipe
+>	order by a,d,c;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>
>>PREPARE stat1 FROM
+>	select a,sb,avg(d) avg_d
+>	from T_654_MV3_pipe
+>	group by a,sb
+>	order by a,sb;

--- SQL command prepared.
>>PREPARE stat2 FROM
+>	select * from T_654_MV4_pipe
+>	order by a,sb;

--- SQL command prepared.
>>obey COMPARE;
>>  log TEMP1 clear;
1,2c1,2
< >>  log TEMP1;
< >>  execute stat1;
---
> >>  log TEMP2;
> >>  execute stat2;
>>
>>
>>--------------------------------------------------------
>>
>>-------------------------------------------------------
>>
>>--Section disabled until range logging is supported
>>	--obey TESTMV654(MVLOG1);
>>
>>-- Clean and Exit
>>
>>obey TESTMV654(CLEAN_UP);
>>-------------------------------------------------------
>>refresh mvgroup MVG1_654 cancel outfile REFRESH.LOG;

--- SQL operation complete.
>>log;


>>
>>drop mv T_654_MV4_pipe;

--- SQL operation complete.
>>drop mv T_654_MV3_pipe;

--- SQL operation complete.
>>drop mv T_654_MV2_pipe;

--- SQL operation complete.
>>drop mv T_654_MV1_pipe;

--- SQL operation complete.
>>drop mv T_654_MV_mdelta;

--- SQL operation complete.
>>drop mv T_654_MV4_min;

--- SQL operation complete.
>>drop mv T_654_MV3_min;

--- SQL operation complete.
>>drop mv T_654_MV2_min;

--- SQL operation complete.
>>drop mv T_654_MV1_min;

--- SQL operation complete.
>>drop mv T_654_MV2_mtx;

--- SQL operation complete.
>>drop mv T_654_MV1_mtx;

--- SQL operation complete.
>>drop mv T_654_MV2_a;

--- SQL operation complete.
>>drop mv T_654_MV1_a;

--- SQL operation complete.
>>
>>drop table T_654_T2;

--- SQL operation complete.
>>drop table T_654_T1;

--- SQL operation complete.
>>drop table temp1_654;

--- SQL operation complete.
>>drop table temp2_654;

--- SQL operation complete.
>>
>>drop mvgroup MVG1_654;

--- SQL operation complete.
>>
>>set param ?schema_name 'MVSCHM';
>>obey COMPARE_NUM_OF_OBJ;
>>-- expected 'EQUAL'
>>select 'EQUAL' as rel
+>from catmvs.mvschm.Num_Obj
+>where  SCHEMA_NAME = ?schema_name and 
+>       num_of_objects
+>	=
+>	(select count(objects.object_uid)  num_of_objcts
+>	from HP_DEFINITION_SCHEMA.objects objects,
+>    HP_SYSTEM_CATALOG.SYSTEM_SCHEMA.SCHEMATA SCHEMATA
+>    	where schemata.schema_uid = objects.schema_uid
+>   	and objects.OBJECT_NAME_SPACE <> 'CN'and ?schema_name =SCHEMA_NAME
+>	group by SCHEMA_NAME);

REL  
-----

EQUAL

--- 1 row(s) selected.
>>
>>drop table Num_Obj;

--- SQL operation complete.
>>log;
