IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_ASSETSPLITENTRY' AND KSQL_INDNAME = 'IDX_FA_SPLITENTRY_REALCARDID') CREATE INDEX IDX_FA_SPLITENTRY_REALCARDID ON T_FA_ASSETSPLITENTRY ( FREALCARDID );

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_CLRBILLENTRY_D' AND KSQL_INDNAME = 'IDX_FA_CLRBILENT_D_REALID') CREATE INDEX IDX_FA_CLRBILENT_D_REALID ON T_FA_CLRBILLENTRY_D ( FREALCARDID );
-- 实物卡片资产类别索引
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_CARD_REAL' AND KSQL_INDNAME = 'IDX_FA_CARREL_ASSETCAT') CREATE INDEX IDX_FA_CARREL_ASSETCAT ON T_FA_CARD_REAL ( FASSETUNITID, FISBAK, FASSETCATID);
-- 盘点记录盘点任务索引
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_INVENTORY_RECORD' AND KSQL_INDNAME = 'IDX_FA_INVENTORY_TASK') CREATE INDEX IDX_FA_INVENTORY_TASK ON T_FA_INVENTORY_RECORD ( FINVENTORYTASKID, FINVENTORYSTATE, FBILLSTATUS );

