/*TODO 7346*/
/*Index changed and new index in SCAN table*/
/*old IndexChange_on_SCAN_ForPerformance.sql*/

begin
execute immediate ('drop index XIE3SCAN;') ;
exception when others then null;
end;
/

begin
execute immediate ('create index XIE3SCAN on SCAN (BUSINESSUNIT_ID, SCANSTATION, STAY_ID, trunc(SCANTIMESTAMP)) 
  tablespace INDX storage ( maxextents unlimited );') ;
exception when others then null;
end;
/

begin
execute immediate ('create index XSPEEDSCAN on SCAN (TRUNC(SCANTIMESTAMP), BUSINESSUNIT_ID, CUSTOMER_LINK_ID) 
  tablespace INDX storage ( maxextents unlimited );') ;
exception when others then null;
end;
/

