/*
--  CopyRight(C) 2003，NTT All rights reserved
--
--  XMS2データベーステーブルのINDEX作成
--
--  スクリプト概要
--
--      XMS2データベースのテーブルを新規に作成します
--
--  変更履歴
--    2004.01.08 新規作成 横山 豪
--
*/

USE %DB_NAME%

GO

-- AICCCOMMENTテーブル
CREATE INDEX AICCCOMMENT_INDEX_1 
ON dbo.AICCCOMMENT
(USERID)
GO

CREATE INDEX AICCCOMMENT_INDEX_2
ON dbo.AICCCOMMENT
(LOID)
GO

-- AICCCOREテーブル
CREATE INDEX AICCCORE_INDEX_1
ON dbo.AICCCORE
(USERID)
GO

CREATE INDEX AICCCORE_INDEX_2
ON dbo.AICCCORE
(LOID)
GO

-- AICCINTERACTIONテーブル
CREATE INDEX AICCINTERACTION_INDEX_1
ON dbo.AICCINTERACTION
(USERID)
GO

CREATE INDEX AICCINTERACTION_INDEX_2
ON dbo.AICCINTERACTION
(LOID)
GO

-- AICCOBJECTIVESテーブル
CREATE INDEX AICCOBJECTIVES_INDEX_1
ON dbo.AICCOBJECTIVES
(USERID)
GO

CREATE INDEX AICCOBJECTIVES_INDEX_2
ON dbo.AICCOBJECTIVES
(LOID)
GO

-- ASSIGNMENTSテーブル
CREATE CLUSTERED INDEX Assignments_Index_1
ON dbo.Assignments
(memberShipID, materialID)
GO

CREATE INDEX ASSIGNMENTS_INDEX_2
ON dbo.ASSIGNMENTS
(MEMBERSHIPID)
GO

-- CATALOGLOテーブル
CREATE INDEX CATALOGLO_INDEX_1
ON dbo.CATALOGLO
(LOID)
GO

-- CATALOGLO_LOLISTテーブル
CREATE INDEX CATALOGLO_LOLIST_INDEX_1
ON dbo.CATALOGLO_LOLIST
(LOID)
GO

-- CONFERENCELOテーブル
CREATE INDEX CONFERENCELO_INDEX_1
ON dbo.CONFERENCELO
(LOID)
GO

-- EVALUATEテーブル
CREATE INDEX EVALUATE_INDEX_1
ON dbo.EVALUATE
(USER_ID)
GO

CREATE INDEX EVALUATE_INDEX_2
ON dbo.EVALUATE
(LOID)
GO

-- EXCHANGELOテーブル
CREATE INDEX EXCHANGELO_INDEX_1
ON dbo.EXCHANGELO
(LOID)
GO

-- FACE2FACELOテーブル
CREATE INDEX FACE2FACELO_INDEX_1
ON dbo.FACE2FACELO
(LOID)
GO

-- GROUPANDPEOPLEテーブル
CREATE INDEX GroupAndPeople_Index_1
ON dbo.GroupAndPeople
(memberShipID)
GO

CREATE CLUSTERED INDEX GroupAndPeople_Index_2
ON dbo.GroupAndPeople
(parentID)
GO

CREATE INDEX GroupAndPeople_Index_3
ON dbo.GroupAndPeople
(childID)
GO

-- GROUPSテーブル
CREATE CLUSTERED INDEX Groups_Index_1
ON dbo.Groups
(group_id)
GO

-- LAUNCHFORGETLOテーブル
CREATE INDEX LAUNCHFORGETLO_INDEX_1
ON dbo.LAUNCHFORGETLO
(LOID)
GO

-- LOテーブル
CREATE CLUSTERED INDEX LO_Index_1
ON dbo.LO
(LOID)
GO

CREATE INDEX LO_INDEX_2
ON dbo.LO
(REALLOID)
GO

-- LOHISTORYテーブル
CREATE INDEX LOHISTORY_INDEX_1
ON dbo.LOHISTORY
(LOID)
GO

-- LOLOGテーブル
CREATE INDEX LOLog_Index_1
ON dbo.LOLog
(UserID)
GO

CREATE INDEX LOLog_Index_2
ON dbo.LOLog
(LOID)
GO

-- LOLOGSESSIONテーブル
CREATE INDEX LOLOGSESSION_INDEX_1
ON dbo.LOLOGSESSION
(USERID)
GO

CREATE INDEX LOLOGSESSION_INDEX_2
ON dbo.LOLOGSESSION
(LOID)
GO

-- LORELATIONテーブル
CREATE INDEX LORelation_Index_1
ON dbo.LORelation
(parentID)
GO

CREATE INDEX LORELATION_INDEX_2
ON dbo.LORELATION
(MATERIALID)
GO

CREATE INDEX LORELATION_INDEX_3
ON dbo.LORELATION
(CHILDID)
GO

-- LOTYPEテーブル
CREATE INDEX LOTYPE_INDEX_1
ON dbo.LOTYPE
(LOTYPE)
GO

-- OFFICELOテーブル
CREATE INDEX OFFICELO_INDEX_1
ON dbo.OFFICELO
(LOID)
GO

-- OFFLINELOテーブル
CREATE INDEX OFFLINELO_INDEX_1
ON dbo.OFFLINELO
(LOID)
GO

-- OL_AICCCOMMENTテーブル
CREATE INDEX OL_AICCCOMMENT_INDEX_1
ON dbo.OL_AICCCOMMENT
(USERID)
GO

CREATE INDEX OL_AICCCOMMENT_INDEX_2
ON dbo.OL_AICCCOMMENT
(LOID)
GO

-- OL_AICCCOREテーブル
CREATE INDEX OL_AICCCORE_INDEX_1
ON dbo.OL_AICCCORE
(USERID)
GO

CREATE INDEX OL_AICCCORE_INDEX_2
ON dbo.OL_AICCCORE
(LOID)
GO

-- OL_AICCINTERACTIONテーブル
CREATE INDEX OL_AICCINTERACTION_INDEX_1
ON dbo.OL_AICCINTERACTION
(USERID)
GO

CREATE INDEX OL_AICCINTERACTION_INDEX_2
ON dbo.OL_AICCINTERACTION
(LOID)
GO

-- OL_AICCOBJECTIVESテーブル
CREATE INDEX OL_AICCOBJECTIVES_INDEX_1
ON dbo.OL_AICCOBJECTIVES
(USERID)
GO

CREATE INDEX OL_AICCOBJECTIVES_INDEX_2
ON dbo.OL_AICCOBJECTIVES
(LOID)
GO

-- OL_SECTIONLOGテーブル
CREATE INDEX OL_SECTIONLOG_INDEX_1
ON dbo.OL_SECTIONLOG
(USERID)
GO

CREATE INDEX OL_SECTIONLOG_INDEX_2
ON dbo.OL_SECTIONLOG
(LOID)
GO

-- PEOPLEテーブル
CREATE CLUSTERED INDEX People_Index_1
ON dbo.People
(user_id)
GO

-- PERCEPTIONLOテーブル
CREATE INDEX PERCEPTIONLO_INDEX_1
ON dbo.PERCEPTIONLO
(LOID)
GO

-- PROPAGATERELATIONテーブル
CREATE INDEX PropagateRelation_Index_1
ON dbo.PropagateRelation
(LOID)
GO

-- PREREQUISITEテーブル
CREATE INDEX PREREQUISITE_INDEX_1
ON dbo.PREREQUISITE
(LOID)
GO

-- ROLEテーブル
CREATE INDEX ROLES_INDEX_1
ON dbo.ROLES
(ROLEID)
GO

-- ROLEASSIGNMENTSテーブル
CREATE INDEX ROLEASSIGNMENTS_INDEX_1
ON dbo.ROLEASSIGNMENTS
(USER_ID)
GO

-- ROLESFUNCTIONテーブル
CREATE INDEX ROLESFUNCTION_INDEX_1
ON dbo.ROLESFUNCTION
(ROLEID)
GO

-- SECTIONLOGテーブル
CREATE INDEX SECTIONLOG_INDEX_1
ON dbo.SECTIONLOG
(USERID)
GO

CREATE INDEX SECTIONLOG_INDEX_2
ON dbo.SECTIONLOG
(LOID)
GO

-- SMARTFORCELOテーブル
CREATE INDEX SMARTFORCELO_INDEX_1
ON dbo.SMARTFORCELO
(LOID)
GO

-- SPSLOテーブル
CREATE INDEX SPSLO_INDEX_1
ON dbo.SPSLO
(LOID)
GO

-- URLLOテーブル
CREATE INDEX URLLO_INDEX_1
ON dbo.URLLO
(LOID)
GO

-- WBTLOテーブル
CREATE INDEX WBTLO_INDEX_1
ON dbo.WBTLO
(LOID)
GO

-- XMOENTRYテーブル
CREATE INDEX XMOENTRY_INDEX_1
ON dbo.XMOENTRY
(XMO_ID)
GO

-- SCORMLOテーブル
CREATE INDEX SCORMLO_INDEX_1 ON SCORMLO
(LOID)
GO

-- SCORM_ATTEMPTテーブル
CREATE INDEX SCORMATTEMPT_INDEX_1 
ON SCORM_ATTEMPT
(USERID)
GO

CREATE INDEX SCORMATTEMPT_INDEX_2 
ON SCORM_ATTEMPT
(LOID)
GO

CREATE INDEX SCORMATTEMPT_INDEX_3 
ON SCORM_ATTEMPT
(STUDYSESSIONCOUNT)
GO

CREATE INDEX SCORMATTEMPT_INDEX_4 
ON SCORM_ATTEMPT
(ACTIVITYID)
GO

CREATE INDEX SCORMATTEMPT_INDEX_5 
ON SCORM_ATTEMPT
(ATTEMPTCOUNT)
GO

CREATE INDEX SCORMATTEMPT_INDEX_6 
ON SCORM_ATTEMPT
(LEARNSESSIONCOUNT)
GO

CREATE INDEX SCORMATTEMPT_INDEX_7 
ON SCORM_ATTEMPT
(SESSIONID)
GO

-- SCORM_INTERACTIONテーブル
CREATE INDEX SCORMINTERACTION_INDEX_1 
ON SCORM_INTERACTION
(USERID)
GO

CREATE INDEX SCORMINTERACTION_INDEX_2 
ON SCORM_INTERACTION
(LOID)
GO

CREATE INDEX SCORMINTERACTION_INDEX_3 
ON SCORM_INTERACTION
(STUDYSESSIONCOUNT)
GO

CREATE INDEX SCORMINTERACTION_INDEX_4 
ON SCORM_INTERACTION
(ACTIVITYID)
GO

CREATE INDEX SCORMINTERACTION_INDEX_5 
ON SCORM_INTERACTION
(ATTEMPTCOUNT)
GO

CREATE INDEX SCORMINTERACTION_INDEX_6 
ON SCORM_INTERACTION
(LEARNSESSIONCOUNT)
GO

CREATE INDEX SCORMINTERACTION_INDEX_7 
ON SCORM_INTERACTION
(INTERACTIONCOUNT)
GO

CREATE INDEX SCORMINTERACTION_INDEX_8 
ON SCORM_INTERACTION
(SESSIONID)
GO

-- SCORM_LEARNERCOMMENTテーブル
CREATE INDEX SCORMLEARNERCOMMENT_INDEX_1 
ON SCORM_LEARNERCOMMENT
(USERID)
GO

CREATE INDEX SCORMLEARNERCOMMENT_INDEX_2 
ON SCORM_LEARNERCOMMENT
(LOID)
GO

CREATE INDEX SCORMLEARNERCOMMENT_INDEX_3 
ON SCORM_LEARNERCOMMENT
(STUDYSESSIONCOUNT)
GO

CREATE INDEX SCORMLEARNERCOMMENT_INDEX_4 
ON SCORM_LEARNERCOMMENT
(ACTIVITYID)
GO

CREATE INDEX SCORMLEARNERCOMMENT_INDEX_5 
ON SCORM_LEARNERCOMMENT
(ATTEMPTCOUNT)
GO

CREATE INDEX SCORMLEARNERCOMMENT_INDEX_6 
ON SCORM_LEARNERCOMMENT
(LEARNSESSIONCOUNT)
GO

CREATE INDEX SCORMLEARNERCOMMENT_INDEX_7 
ON SCORM_LEARNERCOMMENT
(LEARNERCOMMENTCOUNT)
GO

CREATE INDEX SCORMLEARNERCOMMENT_INDEX_8 
ON SCORM_LEARNERCOMMENT
(SESSIONID)
GO

-- SCORM_LMSCOMMENTテーブル
CREATE INDEX SCORMLMSCOMMENT_INDEX_1 
ON SCORM_LMSCOMMENT
(USERID)
GO

CREATE INDEX SCORMLMSCOMMENT_INDEX_2 
ON SCORM_LMSCOMMENT
(LOID)
GO

CREATE INDEX SCORMLMSCOMMENT_INDEX_3 
ON SCORM_LMSCOMMENT
(STUDYSESSIONCOUNT)
GO

CREATE INDEX SCORMLMSCOMMENT_INDEX_4 
ON SCORM_LMSCOMMENT
(ACTIVITYID)
GO

CREATE INDEX SCORMLMSCOMMENT_INDEX_5 
ON SCORM_LMSCOMMENT
(ATTEMPTCOUNT)
GO

CREATE INDEX SCORMLMSCOMMENT_INDEX_6 
ON SCORM_LMSCOMMENT
(LEARNSESSIONCOUNT)
GO

CREATE INDEX SCORMLMSCOMMENT_INDEX_7 
ON SCORM_LMSCOMMENT
(LMSCOMMENTCOUNT)
GO

CREATE INDEX SCORMLMSCOMMENT_INDEX_8 
ON SCORM_LMSCOMMENT
(SESSIONID)
GO

-- SCORM_OBJECTIVEテーブル
CREATE INDEX SCORMOBJECTIVE_INDEX_1 
ON SCORM_OBJECTIVE
(USERID)
GO

CREATE INDEX SCORMOBJECTIVE_INDEX_2 
ON SCORM_OBJECTIVE
(LOID)
GO

CREATE INDEX SCORMOBJECTIVE_INDEX_3 
ON SCORM_OBJECTIVE
(STUDYSESSIONCOUNT)
GO

CREATE INDEX SCORMOBJECTIVE_INDEX_4 
ON SCORM_OBJECTIVE
(ACTIVITYID)
GO

CREATE INDEX SCORMOBJECTIVE_INDEX_5 
ON SCORM_OBJECTIVE
(ATTEMPTCOUNT)
GO

CREATE INDEX SCORMOBJECTIVE_INDEX_6 
ON SCORM_OBJECTIVE
(LEARNSESSIONCOUNT)
GO

CREATE INDEX SCORMOBJECTIVE_INDEX_7 
ON SCORM_OBJECTIVE
(OBJECTIVECOUNT)
GO

CREATE INDEX SCORMOBJECTIVE_INDEX_8 
ON SCORM_OBJECTIVE
(SESSIONID)
GO

-- SCORMSESSIONテーブル
CREATE INDEX SCORMSESSION_INDEX_1 
ON SCORMSESSION
(USERID)
GO

CREATE INDEX SCORMSESSION_INDEX_2 
ON SCORMSESSION
(LOID)
GO

CREATE INDEX SCORMSESSION_INDEX_3 
ON SCORMSESSION
(STUDYSESSIONCOUNT)
GO

CREATE INDEX SCORMSESSION_INDEX_4 
ON SCORMSESSION
(SESSIONID)
GO
