--T_PDM_MFTBOM 索引
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOM_COMPT1') 
CREATE INDEX IDX_PDM_MFTBOM_COMPT1 ON T_PDM_MFTBOM (FMATID,FTYPEID,FSTATUS,FENABLE,FREPLACENOID,FVERSIONID);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOM_COMPT2') 
CREATE INDEX IDX_PDM_MFTBOM_COMPT2 ON T_PDM_MFTBOM (FMATID,FTYPEID,FSTATUS,FENABLE,FREPLACENOID);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOM_COMPT3') 
CREATE INDEX IDX_PDM_MFTBOM_COMPT3 ON T_PDM_MFTBOM (FMATID,FTYPEID,FSTATUS,FENABLE);


--T_PDM_MFTBOMENTRY 索引
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMENTRY_C1') 
CREATE INDEX IDX_PDM_MFTBOMENTRY_C1 ON T_PDM_MFTBOMENTRY (FID,FVALIDDATE,FINVALIDDATE);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MFTBOMENTRY_C2') 
CREATE INDEX IDX_PDM_MFTBOMENTRY_C2 ON T_PDM_MFTBOMENTRY (FID,FINVALIDDATE);