-- Software Version: MKF 4.4.1, ProdDefinition.XML version: 201603221300, CreateDate: 3/22/2016

-- For FDB to remove. It's the primary key.
-- DROP INDEX ixfdbclinicallinside_1;
-- CREATE   INDEX ixfdbclinicallinside_1 ON fdb_clinical_link_side (drugunivid,sideid);

SET FEEDBACK OFF;
SET ECHO OFF;
REM DROP INDEX ixfdbahfsclassificationlink1;
CREATE   INDEX ixfdbahfsclassificationlink1 ON fdb_ahfs_classification_link (classunivid);
REM DROP INDEX ixallerextvlinkunivid;
CREATE   INDEX ixallerextvlinkunivid ON fdb_allergen_ext_vocab_link (fdbunivid);
REM DROP INDEX ixfdballergengroup1;
CREATE   INDEX ixfdballergengroup1 ON fdb_allergengroup (descsearch);
REM DROP INDEX ixfdballergengroup2;
CREATE   INDEX ixfdballergengroup2 ON fdb_allergengroup (altdescsearch);
REM DROP INDEX ixfdballergengroup3;
CREATE   INDEX ixfdballergengroup3 ON fdb_allergengroup (univid);
REM DROP INDEX ixfdballergenpicklistsearch1;
CREATE   INDEX ixfdballergenpicklistsearch1 ON fdb_allergenpicklist_search (descsearch);
REM DROP INDEX ixfdballergenpicklistsearch2;
CREATE   INDEX ixfdballergenpicklistsearch2 ON fdb_allergenpicklist_search (altdescsearch);
REM DROP INDEX ixfdballergycrosssensitivity1;
CREATE   INDEX ixfdballergycrosssensitivity1 ON fdb_allergycrosssensitivity (univid);
REM DROP INDEX ixfdbclassification1;
CREATE   INDEX ixfdbclassification1 ON fdb_classification (descsearch);
REM DROP INDEX ixfdbclassification2;
CREATE   INDEX ixfdbclassification2 ON fdb_classification (parentunivid);
REM DROP INDEX ixfdbclassification3;
CREATE   INDEX ixfdbclassification3 ON fdb_classification (ultiparentunivid);
REM DROP INDEX ixfdbclassification4;
CREATE   INDEX ixfdbclassification4 ON fdb_classification (altdescsearch);
REM DROP INDEX ixfdbclinicallink;
CREATE   INDEX ixfdbclinicallink ON fdb_clinical_link (clinicalmoduleunivid);
REM DROP INDEX ixfdbclinicallinkddc_1;
CREATE   INDEX ixfdbclinicallinkddc_1 ON fdb_clinical_link_ddc (ddxcn,drugcode,drugid);
REM DROP INDEX ixfdbclinicallinkind_1;
CREATE   INDEX ixfdbclinicallinkind_1 ON fdb_clinical_link_ind (indcts,drugcode,drugid);
REM DROP INDEX ixfdbclinicallinside_1;
REM CREATE   INDEX ixfdbclinicallinside_1 ON fdb_clinical_link_side (drugunivid,sideid);
REM DROP INDEX ixfdbclinicallinside_2;
CREATE   INDEX ixfdbclinicallinside_2 ON fdb_clinical_link_side (sideid,drugcode,drugid);
REM DROP INDEX idx1_fdbcustomfreqinterval;
CREATE   INDEX idx1_fdbcustomfreqinterval ON fdb_custom_frequency_interval (freq_int_text_short);
REM DROP INDEX idx2_fdbcustomfreqinterval;
CREATE   INDEX idx2_fdbcustomfreqinterval ON fdb_custom_frequency_interval (freq_int_text_long);
REM DROP INDEX ixfdbddiminteraction1;
CREATE   INDEX ixfdbddiminteraction1 ON fdb_ddiminteraction (univid);
REM DROP INDEX ixfdbdfiminteraction1;
CREATE   INDEX ixfdbdfiminteraction1 ON fdb_dfiminteraction (univid);
REM DROP INDEX ixdispensablemnid;
CREATE   INDEX ixdispensablemnid ON fdb_dispensable (mnid);
REM DROP INDEX ixdispensablefdrmid;
CREATE   INDEX ixdispensablefdrmid ON fdb_dispensable (rdfmid);
REM DROP INDEX ixdispensablermid;
CREATE   INDEX ixdispensablermid ON fdb_dispensable (rmid);
REM DROP INDEX ixfdbdispensable2;
CREATE   INDEX ixfdbdispensable2 ON fdb_dispensable (univid);
REM DROP INDEX ixfdbdispensablegenlink1;
CREATE   INDEX ixfdbdispensablegenlink1 ON fdb_dispensable_gen_link (gcnseqno);
REM DROP INDEX ixfdbdispensablepackageddrug1;
CREATE   INDEX ixfdbdispensablepackageddrug1 ON fdb_dispensable_packageddrug (pdid);
REM DROP INDEX ixfdbdispensablesearch1;
CREATE   INDEX ixfdbdispensablesearch1 ON fdb_dispensable_search (descsearch);
REM DROP INDEX ixfdbdispensablesearch2;
CREATE   INDEX ixfdbdispensablesearch2 ON fdb_dispensable_search (altdescsearch);
REM DROP INDEX ixfdbdispensablesearchterm1;
CREATE   INDEX ixfdbdispensablesearchterm1 ON fdb_dispensable_search_term (textsearch);
REM DROP INDEX ixfdbdispensablesearchterm2;
CREATE   INDEX ixfdbdispensablesearchterm2 ON fdb_dispensable_search_term (alttextsearch);
REM DROP INDEX ixfdbdispensablevalue_1;
CREATE   INDEX ixfdbdispensablevalue_1 ON fdb_dispensable_value (propertyid,medid,propertyvalue);
REM DROP INDEX ixfdbdispensablevalue_2;
CREATE   INDEX ixfdbdispensablevalue_2 ON fdb_dispensable_value (propertyid,propertyvalue,medid);
REM DROP INDEX idx1fdbdosing;
CREATE   INDEX idx1fdbdosing ON fdb_dosing (drugunivid,renalimpairmentind,creatinineclrthreshold);
REM DROP INDEX idxfdbdosingrenal;
CREATE   INDEX idxfdbdosingrenal ON fdb_dosing_renal (ntesingledoseunitid_m,ntesingledoseunitid_f,dosingadjustmenttypecode);
REM DROP INDEX ixfdbdruggendrugname1;
CREATE   INDEX ixfdbdruggendrugname1 ON fdb_drug_gen_drugname (hiclseqno);
REM DROP INDEX ixfdbdrugname1;
CREATE   INDEX ixfdbdrugname1 ON fdb_drugname (univid);
REM DROP INDEX ixfdbdrugnamegenlink1;
CREATE   INDEX ixfdbdrugnamegenlink1 ON fdb_drugname_gen_link (hiclseqno);
REM DROP INDEX ixfdbdrugnamesearch1;
CREATE   INDEX ixfdbdrugnamesearch1 ON fdb_drugname_search (descsearch);
REM DROP INDEX ixfdbdrugnamesearch2;
CREATE   INDEX ixfdbdrugnamesearch2 ON fdb_drugname_search (altdescsearch);
REM DROP INDEX ix1_fdbextproductcode;
CREATE   INDEX ix1_fdbextproductcode ON fdb_ext_product_code (ext_product_code);
REM DROP INDEX ix2_fdbextproductcode;
CREATE   INDEX ix2_fdbextproductcode ON fdb_ext_product_code (drugunivid);
REM DROP INDEX ixfdbextvocab1;
CREATE   INDEX ixfdbextvocab1 ON fdb_ext_vocab (univid);
REM DROP INDEX ixvocabcatcode;
CREATE   INDEX ixvocabcatcode ON fdb_ext_vocab_category_link (extvocabtypecode);
REM DROP INDEX ixextvocabfdbidcode;
CREATE   INDEX ixextvocabfdbidcode ON fdb_ext_vocab_fdb_link (extvocabid,extvocabtypecode);
REM DROP INDEX ixfdbextvocabvalue1;
CREATE   INDEX ixfdbextvocabvalue1 ON fdb_ext_vocab_value (propertyvalue);
REM DROP INDEX fcsfedschedstartend;
CREATE   INDEX fcsfedschedstartend ON fdb_fcs_assoc_univfedsched (startdate,enddate);
REM DROP INDEX fcsunivstate;
CREATE   INDEX fcsunivstate ON fdb_fcs_assoc_univstate (state_cd,startdate);
REM DROP INDEX fcsunivstateend;
CREATE   INDEX fcsunivstateend ON fdb_fcs_assoc_univstate (state_cd,enddate);
REM DROP INDEX fcsunivstatestartend;
CREATE   INDEX fcsunivstatestartend ON fdb_fcs_assoc_univstate (state_cd,startdate,enddate);
REM DROP INDEX ixfcsdiffstateuniv;
CREATE   INDEX ixfcsdiffstateuniv ON fdb_fcs_assoc_univstate (statefederaldiff_cd,state_cd,drugunivid);
REM DROP INDEX ixfcsschedstatedrug;
CREATE   INDEX ixfcsschedstatedrug ON fdb_fcs_assoc_univstate (stateschedule_cd,state_cd,drugunivid);
REM DROP INDEX ixfcsstschedendstartuniv;
CREATE   INDEX ixfcsstschedendstartuniv ON fdb_fcs_assoc_univstate (state_cd,stateschedule_cd,enddate,startdate,drugunivid);
REM DROP INDEX ixfcsunivenddate;
CREATE   INDEX ixfcsunivenddate ON fdb_fcs_assoc_univstate (enddate);
REM DROP INDEX ixfcsunivstartdate;
CREATE   INDEX ixfcsunivstartdate ON fdb_fcs_assoc_univstate (startdate);
REM DROP INDEX fcspdmpstateend;
CREATE   INDEX fcspdmpstateend ON fdb_fcs_assoc_univstatepdmp (state_cd,enddate);
REM DROP INDEX fcspdmpstatestartend;
CREATE   INDEX fcspdmpstatestartend ON fdb_fcs_assoc_univstatepdmp (state_cd,startdate,enddate);
REM DROP INDEX ixpdmpstunivend;
CREATE   INDEX ixpdmpstunivend ON fdb_fcs_assoc_univstatepdmp (state_cd,drugunivid,enddate);
REM DROP INDEX ixpdmpuniv;
CREATE   INDEX ixpdmpuniv ON fdb_fcs_assoc_univstatepdmp (pdmplisttype_cd,drugunivid);
REM DROP INDEX ixfcsmulticodestate;
CREATE   INDEX ixfcsmulticodestate ON fdb_fcs_statemulticode (state_cd);
REM DROP INDEX ix1_fdbfdaapprelationship;
CREATE   INDEX ix1_fdbfdaapprelationship ON fdb_fda_app_relationship (appl_nbr1,appl_type_id1);
REM DROP INDEX ix2_fdbfdaapprelationship;
CREATE   INDEX ix2_fdbfdaapprelationship ON fdb_fda_app_relationship (appl_nbr2,appl_type_id2);
REM DROP INDEX ixfdbfrequencyinterval1;
CREATE   INDEX ixfdbfrequencyinterval1 ON fdb_frequency_interval (univid);
REM DROP INDEX ixgendisphiclseqno;
CREATE   INDEX ixgendisphiclseqno ON fdb_gen_dispensable (hiclseqno);
REM DROP INDEX ixgendisprtdfgenid;
CREATE   INDEX ixgendisprtdfgenid ON fdb_gen_dispensable (rtdfgenid);
REM DROP INDEX ixgendisprtgenid;
CREATE   INDEX ixgendisprtgenid ON fdb_gen_dispensable (rtgenid);
REM DROP INDEX ixfdbgendispensable1;
CREATE   INDEX ixfdbgendispensable1 ON fdb_gen_dispensable (univid);
REM DROP INDEX ixfdbgendispensablesearch1;
CREATE   INDEX ixfdbgendispensablesearch1 ON fdb_gen_dispensable_search (descsearch);
REM DROP INDEX ixfdbgendispensablesearch2;
CREATE   INDEX ixfdbgendispensablesearch2 ON fdb_gen_dispensable_search (altdescsearch);
REM DROP INDEX ixfdbgendrugname1;
CREATE   INDEX ixfdbgendrugname1 ON fdb_gen_drugname (univid);
REM DROP INDEX ixfdbgendrugnamesearch1;
CREATE   INDEX ixfdbgendrugnamesearch1 ON fdb_gen_drugname_search (descsearch);
REM DROP INDEX ixfdbgendrugnamesearch2;
CREATE   INDEX ixfdbgendrugnamesearch2 ON fdb_gen_drugname_search (altdescsearch);
REM DROP INDEX ixfdbgenrouteddfdrug1;
CREATE   INDEX ixfdbgenrouteddfdrug1 ON fdb_gen_routeddfdrug (univid);
REM DROP INDEX ixfdbgenrouteddfdrugsearch1;
CREATE   INDEX ixfdbgenrouteddfdrugsearch1 ON fdb_gen_routeddfdrug_search (descsearch);
REM DROP INDEX ixfdbgenrouteddfdrugsearch2;
CREATE   INDEX ixfdbgenrouteddfdrugsearch2 ON fdb_gen_routeddfdrug_search (altdescsearch);
REM DROP INDEX ixfdbgenrouteddrug1;
CREATE   INDEX ixfdbgenrouteddrug1 ON fdb_gen_routeddrug (univid);
REM DROP INDEX ixfdbgenrouteddrugsearch1;
CREATE   INDEX ixfdbgenrouteddrugsearch1 ON fdb_gen_routeddrug_search (descsearch);
REM DROP INDEX ixfdbgenrouteddrugsearch2;
CREATE   INDEX ixfdbgenrouteddrugsearch2 ON fdb_gen_routeddrug_search (altdescsearch);
REM DROP INDEX idxsearchdesc;
CREATE   INDEX idxsearchdesc ON fdb_imprint (ipt_search_description);
REM DROP INDEX ixfdbimprint1;
CREATE   INDEX ixfdbimprint1 ON fdb_imprint (ipt_label_cd);
REM DROP INDEX ixfdbimprint2;
CREATE   INDEX ixfdbimprint2 ON fdb_imprint (ipt_doseform_cd);
REM DROP INDEX ixfdbimprint3;
CREATE   INDEX ixfdbimprint3 ON fdb_imprint (ipt_shape_cd);
REM DROP INDEX ixfdbimprint4;
CREATE   INDEX ixfdbimprint4 ON fdb_imprint (ipt_scoring_cd);
REM DROP INDEX ixfdbimprint5;
CREATE   INDEX ixfdbimprint5 ON fdb_imprint (ipt_coating_cd);
REM DROP INDEX ixfdbimprint6;
CREATE   INDEX ixfdbimprint6 ON fdb_imprint (ipt_flavor_cd);
REM DROP INDEX ixfdbimprint7;
CREATE   INDEX ixfdbimprint7 ON fdb_imprint (ipt_clarity_cd);
REM DROP INDEX ixfdbimprint8;
CREATE   INDEX ixfdbimprint8 ON fdb_imprint (ipt_mfr_cd);
REM DROP INDEX idximprinttext;
CREATE   INDEX idximprinttext ON fdb_imprint_text (ipt_text_cd);
REM DROP INDEX ixfdbind_1;
CREATE   INDEX ixfdbind_1 ON fdb_ind (dxid,indcts,sequencenumber,drugdesc,diseasedesc,labeledcode,proxyind,predictorcode);
REM DROP INDEX ixfdbingredient1;
CREATE   INDEX ixfdbingredient1 ON fdb_ingredient (descsearch);
REM DROP INDEX ixfdbingredient2;
CREATE   INDEX ixfdbingredient2 ON fdb_ingredient (altdescsearch);
REM DROP INDEX ixfdbingredient3;
CREATE   INDEX ixfdbingredient3 ON fdb_ingredient (univid);
REM DROP INDEX ixfdbmasterdosageform1;
CREATE   INDEX ixfdbmasterdosageform1 ON fdb_master_dosage_form (univid);
REM DROP INDEX ixfdbmasterroute1;
CREATE   INDEX ixfdbmasterroute1 ON fdb_master_route (univid);
REM DROP INDEX ixfdbmasterunit1;
CREATE   INDEX ixfdbmasterunit1 ON fdb_master_unit (univid);
REM DROP INDEX ixfdbmedcond1;
CREATE   INDEX ixfdbmedcond1 ON fdb_medcond (descsearchlong);
REM DROP INDEX ixfdbmedcond2;
CREATE   INDEX ixfdbmedcond2 ON fdb_medcond (descsearchshort);
REM DROP INDEX ixfdbmedcond3;
CREATE   INDEX ixfdbmedcond3 ON fdb_medcond (fdbdx);
REM DROP INDEX ixfdbmedcond4;
CREATE   INDEX ixfdbmedcond4 ON fdb_medcond (altdescsearchlong);
REM DROP INDEX ixfdbmedcond5;
CREATE   INDEX ixfdbmedcond5 ON fdb_medcond (altdescsearchshort);
REM DROP INDEX ixfdbmedcond6;
CREATE   INDEX ixfdbmedcond6 ON fdb_medcond (dxid,descsearchlong);
REM DROP INDEX ixfdbmedcondext1;
CREATE   INDEX ixfdbmedcondext1 ON fdb_medcond_ext (vocabtypeid,descsearchlong);
REM DROP INDEX ixfdbmedcondext2;
CREATE   INDEX ixfdbmedcondext2 ON fdb_medcond_ext (vocabtypeid,altdescsearchlong);
REM DROP INDEX ixmedcondvocabidsearch;
CREATE   INDEX ixmedcondvocabidsearch ON fdb_medcond_ext (vocabidsearch);
REM DROP INDEX ixfdb_medcond_ext_exclusion1;
CREATE   INDEX ixfdb_medcond_ext_exclusion1 ON fdb_medcond_ext_exclusion (dxid);
REM DROP INDEX ixfdb_medcond_ext_exclusion2;
CREATE   INDEX ixfdb_medcond_ext_exclusion2 ON fdb_medcond_ext_exclusion (clinicalcode,clinicalmoduleid);
REM DROP INDEX ixfdb_medcond_synonym1;
CREATE   INDEX ixfdb_medcond_synonym1 ON fdb_medcond_synonym (dxid);
REM DROP INDEX ixfdb_medcond_synonym2;
CREATE   INDEX ixfdb_medcond_synonym2 ON fdb_medcond_synonym (descsearchshort);
REM DROP INDEX ixfdb_medcond_synonym3;
CREATE   INDEX ixfdb_medcond_synonym3 ON fdb_medcond_synonym (descsearchlong);
REM DROP INDEX ixfdb_medcond_synonym4;
CREATE   INDEX ixfdb_medcond_synonym4 ON fdb_medcond_synonym (altdescsearchshort);
REM DROP INDEX ixfdb_medcond_synonym5;
CREATE   INDEX ixfdb_medcond_synonym5 ON fdb_medcond_synonym (altdescsearchlong);
REM DROP INDEX ixfdbmonographddim1;
CREATE   INDEX ixfdbmonographddim1 ON fdb_monograph_ddim (univid);
REM DROP INDEX ixfdbmonographdfim1;
CREATE   INDEX ixfdbmonographdfim1 ON fdb_monograph_dfim (univid);
REM DROP INDEX ixfdbmonographdosing1;
CREATE   INDEX ixfdbmonographdosing1 ON fdb_monograph_dosing (univid);
REM DROP INDEX ixfdbmonographpem1;
CREATE   INDEX ixfdbmonographpem1 ON fdb_monograph_pem (univid);
REM DROP INDEX idxpackdruggcnseqno;
CREATE   INDEX idxpackdruggcnseqno ON fdb_packageddrug (gcnseqno);
REM DROP INDEX idxpackdruggenericmedid;
CREATE   INDEX idxpackdruggenericmedid ON fdb_packageddrug (genericmedid);
REM DROP INDEX idxpackdrugmedid;
CREATE   INDEX idxpackdrugmedid ON fdb_packageddrug (medid);
REM DROP INDEX idxpackdrugmnid;
CREATE   INDEX idxpackdrugmnid ON fdb_packageddrug (mnid);
REM DROP INDEX idxpackdrugrdfmid;
CREATE   INDEX idxpackdrugrdfmid ON fdb_packageddrug (rdfmid);
REM DROP INDEX idxpackdrugrtdfgenid;
CREATE   INDEX idxpackdrugrtdfgenid ON fdb_packageddrug (rtdfgenid);
REM DROP INDEX idxpackdrugrtgenid;
CREATE   INDEX idxpackdrugrtgenid ON fdb_packageddrug (rtgenid);
REM DROP INDEX ixfdbpackageddrug1;
CREATE   INDEX ixfdbpackageddrug1 ON fdb_packageddrug (univid);
REM DROP INDEX ixfdbpackageddrugsearch1;
CREATE   INDEX ixfdbpackageddrugsearch1 ON fdb_packageddrug_search (descsearch);
REM DROP INDEX ixfdbpackageddrugsearch2;
CREATE   INDEX ixfdbpackageddrugsearch2 ON fdb_packageddrug_search (altdescsearch);
REM DROP INDEX ixpackageddrugpropid;
CREATE   INDEX ixpackageddrugpropid ON fdb_packageddrug_value (propertyid);
REM DROP INDEX ixpackdrugpropidval;
CREATE   INDEX ixpackdrugpropidval ON fdb_packageddrug_value (propertyid,pdid,propertyvalue);
REM DROP INDEX ixfdbprecgeri1;
CREATE   INDEX ixfdbprecgeri1 ON fdb_precgeri (univid);
REM DROP INDEX ixfdbpreclact1;
CREATE   INDEX ixfdbpreclact1 ON fdb_preclact (univid);
REM DROP INDEX ixfdbprecpedi1;
CREATE   INDEX ixfdbprecpedi1 ON fdb_precpedi (univid);
REM DROP INDEX ixfdbprecpreg1;
CREATE   INDEX ixfdbprecpreg1 ON fdb_precpreg (univid);
REM DROP INDEX ixfdbprecpregmono1;
CREATE   INDEX ixfdbprecpregmono1 ON fdb_precpreg_mono (pregcode);
REM DROP INDEX ix1_fdbproduct;
CREATE   INDEX ix1_fdbproduct ON fdb_product (desc_search);
REM DROP INDEX ix2_fdbproduct;
CREATE   INDEX ix2_fdbproduct ON fdb_product (alt_desc_search);
REM DROP INDEX ixfdbrouteddfdrug1;
CREATE   INDEX ixfdbrouteddfdrug1 ON fdb_routeddfdrug (univid);
REM DROP INDEX ixfdbrouteddfdruggenlink1;
CREATE   INDEX ixfdbrouteddfdruggenlink1 ON fdb_routeddfdrug_gen_link (rtdfgenid);
REM DROP INDEX ixfdbrouteddfdrugsearch1;
CREATE   INDEX ixfdbrouteddfdrugsearch1 ON fdb_routeddfdrug_search (descsearch);
REM DROP INDEX ixfdbrouteddfdrugsearch2;
CREATE   INDEX ixfdbrouteddfdrugsearch2 ON fdb_routeddfdrug_search (altdescsearch);
REM DROP INDEX ixfdbrouteddrug1;
CREATE   INDEX ixfdbrouteddrug1 ON fdb_routeddrug (univid);
REM DROP INDEX ixfdbrouteddruggenlink1;
CREATE   INDEX ixfdbrouteddruggenlink1 ON fdb_routeddrug_gen_link (rtgenid);
REM DROP INDEX ixfdbrouteddrugsearch1;
CREATE   INDEX ixfdbrouteddrugsearch1 ON fdb_routeddrug_search (descsearch);
REM DROP INDEX ixfdbrouteddrugsearch2;
CREATE   INDEX ixfdbrouteddrugsearch2 ON fdb_routeddrug_search (altdescsearch);
REM DROP INDEX ix1_fdbrxnormterm;
CREATE   INDEX ix1_fdbrxnormterm ON fdb_rxnorm_term (rxcui,rxn_sab,rxn_tty,rxn_code);
REM DROP INDEX idx1alttermsearch;
CREATE   INDEX idx1alttermsearch ON fdb_sct_value_set (alt_term_search);
REM DROP INDEX idx2termsearch;
CREATE   INDEX idx2termsearch ON fdb_sct_value_set (term_search);
REM DROP INDEX ixfdbside_1;
CREATE   INDEX ixfdbside_1 ON fdb_side (dxid,sideid);
REM DROP INDEX ixfdbuomtypedescription1;
CREATE   INDEX ixfdbuomtypedescription1 ON fdb_uom_type_description (univid);
REM DROP INDEX idxvsoid;
CREATE   INDEX idxvsoid ON fdb_ushik (ushik_value_set_oid);
exec dbms_stats.gather_schema_stats(ownname => null, options => 'GATHER');

exit;