-- SterileSupply index

--create index sid_orgUnitCoding on PackingRecord (orgUnitCoding)
--create index sid_packer on PackingRecord (packer)
--create index sid_taskGroup on PackingRecord (taskGroup)
--create index sid_packTime on PackingRecord (packTime)

--器械包实例表中为了节省查询时间在器械包名做了索引
CREATE INDEX operationTime_index ON tousseinstance(operationTime);

CREATE INDEX tousseName_index ON tousseinstance(tousseName);

CREATE INDEX reviewTime_index ON tousseinstance(reviewTime);
--通过灭菌篮筐查找器械包,建立索引增加查询速度
CREATE INDEX reviewedBasket_id_index ON tousseinstance(reviewBasket_id);

CREATE INDEX ti_combo_index  on TousseInstance (orgUnitCoding, status , validUntil ,warningUntil)

--器械包装配记录的装配时间索引
CREATE INDEX packTime_index ON PackingRecord(packTime);

--发货单的发货时间索引
CREATE INDEX sendTime_index ON invoice(sendTime);

--申请单的申请时间索引
CREATE INDEX applicationTime_index ON invoicePlan(applicationTime);

--回收记录的回收时间索引
CREATE INDEX recyclingTime_index ON recyclingRecord(recyclingTime);

--清洗记录的清洗时间索引
CREATE INDEX recordCreateDate_index ON washAndDisinfectRecord(recordCreateDate);

CREATE INDEX startDate_index ON washAndDisinfectRecord(startDate);

CREATE INDEX endDate_index ON washAndDisinfectRecord(endDate);

--灭菌记录的灭菌时间索引，名称加后缀，避免oracle索引重名的问题
CREATE INDEX startDate2_index ON sterilizationRecord(startDate);

CREATE INDEX endDate2_index ON sterilizationRecord(endDate);

CREATE INDEX expDate_index  on DiposableGoodBatchStock (expDate);

-- ACL index
create index sid_index on acl_entry (sid)

create index identity_index on acl_entry (acl_object_identity)

-- JBPM index
create index VI_TVM on JBPM_VARIABLEINSTANCE (TOKENVARIABLEMAP_) 

create index VI_TOKEN_ on JBPM_VARIABLEINSTANCE (TOKEN_) 

create index VI_TI on JBPM_VARIABLEINSTANCE (TASKINSTANCE_) 

create index VI_CLASS on JBPM_VARIABLEINSTANCE (CLASS_)

create index VI_NAME on JBPM_VARIABLEINSTANCE (NAME_)

create index IDX_MI_PI on JBPM_MODULEINSTANCE (PROCESSINSTANCE_) 

create index IDX_TOK_PARENT on JBPM_TOKEN (PARENT_) 

create index IDX_SWI_TMI on JBPM_SWIMLANEINSTANCE (TASKMGMTINSTANCE_) 
  
create index IDX_TVM_CI on JBPM_TOKENVARIABLEMAP (CONTEXTINSTANCE_) 
  
create index IDX_BB_PF on JBPM_BYTEBLOCK (PROCESSFILE_) 
  
create index IDX_TASK_ACTORID on JBPM_TASKINSTANCE (ACTORID_) 

--create index IDX_TASK_APP_ID_ on JBPM_TASKINSTANCE (APP_ID_) 

--create index IDX_TASK_INITIATOR_ on JBPM_TASKINSTANCE (INITIATOR_) 

--create index IDX_TASK_TASK_TYPE_ on JBPM_TASKINSTANCE (TASK_TYPE_) 

--create index IDX_TASK_TOP_PI_ID_ on JBPM_TASKINSTANCE (TOP_PI_ID_) 

create index IDX_TI_TASKMGMTIN_ on JBPM_TASKINSTANCE (TASKMGMTINSTANCE_)

create index IDX_CLASS on JBPM_LOG (CLASS_)

create index IDX_INDEX on JBPM_LOG (INDEX_)

create index IDX_TOKEN on JBPM_LOG (TOKEN_)

create index IDX_PARENT on JBPM_LOG (PARENT_)

create index IDX_TASKINSTANCE on JBPM_LOG (TASKINSTANCE_)

-- Workflow index
create index opinionIndex on WORKFLOW_OPINION (opinionCollectionId)

create index IDX_OpinionListName on WORKFLOW_OPINIONCOLLECTION (opinionListName)

create index IDX_InnerFileId on WORKFLOW_OPINIONCOLLECTION (innerFileId)

