EXEC p_DropIdx 'IDX_PERM_FIDAEP', 'T_PERM_USERPERMDETAIL';
EXEC p_DropIdx 'IDX_PERM_UPDPEB', 'T_PERM_USERPERMDETAIL';
EXEC p_DropIdx 'IDX_USERDIM', 'T_PERM_USERPERMDETAIL';
EXEC p_DropIdx 'IX_PERM_AEP', 'T_PERM_USERPERMDETAIL';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_UPD') CREATE INDEX IDX_UPD ON T_PERM_USERPERMDETAIL ( FUSERID ,FBIZAPPID ,FENTITYTYPEID ,FPERMITEMID ,FDIMID );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FID') CREATE INDEX IDX_FID ON T_PERM_USERPERMDETAIL ( FID );
