--
-- a. drop indexes created 
--    when making the changes.
DROP INDEX "SCOTT"."ADM_PG_FEATUREVALUE_IDX2";
DROP INDEX "SCOTT"."LU_ELEMENTRANGE_REL_IDX";
DROP INDEX "SCOTT"."LU_ELEMENTGROUP_REL_IDX1";


--
-- b. rebuild indices on query1 affetct almost al queries q39.
-- ALTER INDEX "ADM_PG_FEATUREVALUE_PK" REBUILD NOLOGGING;
CREATE INDEX "LU_ELEMENTRANGE_REL_IDX" ON "LU_ELEMENTRANGE_REL" ("ELEMENTRANGE_ID" )  
PCTFREE 10 INITRANS 2 MAXTRANS 255 
STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) 
TABLESPACE "SYSTEM" NOLOGGING;

CREATE INDEX "LU_ELEMENTGROUP_REL_IDX1" ON "LU_ELEMENTGROUP_REL" ("ELEMENTGROUP_ID" )  
PCTFREE 10 INITRANS 2 MAXTRANS 255 
STORAGE(INITIAL 131072 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) 
TABLESPACE "SYSTEM" NOLOGGING;


--
-- c. drop any existing profiles
exec sys.dbms_sqltune_internal.test_drop_sql_profiles;
select count(*) from dba_sql_profiles; 
