Skip to content

Commit

Permalink
Merge pull request sakaiproject#178 from ottenhoff/SAM-2259
Browse files Browse the repository at this point in the history
SAM-2259 optimize columns related to question pools to improve performance
  • Loading branch information
ottenhoff committed Feb 13, 2015
2 parents 7b450cf + 6e89569 commit 4342cc7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
9 changes: 9 additions & 0 deletions reference/docs/conversion/sakai_11_mysql_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,12 @@ INSERT INTO SAKAI_SITE_TOOL VALUES('!user-999', '!user-99', '!user', 'sakai.dash
ALTER TABLE GB_GRADABLE_OBJECT_T MODIFY DUE_DATE DATETIME;
-- End SAK-25385

-- SAM-2259 Optimizing Samigo question pool performance
ALTER TABLE SAM_QUESTIONPOOLITEM_T CHANGE COLUMN ITEMID ITEMID bigint(20);
ALTER TABLE SAM_QUESTIONPOOLITEM_T ADD INDEX SAM_IDX_ITEMID (ITEMID);
ALTER TABLE SAM_AUTHZDATA_T DROP INDEX sam_authz_functionId_idx;
ALTER TABLE SAM_AUTHZDATA_T DROP INDEX sam_authz_qualifierId_idx;
ALTER TABLE SAM_AUTHZDATA_T ADD INDEX SAM_IDX_FUNC_QUAL (FUNCTIONID,QUALIFIERID);
ALTER TABLE SAM_AUTHZDATA_T MODIFY COLUMN AGENTID varchar(99);
ALTER TABLE SAM_AUTHZDATA_T MODIFY COLUMN LASTMODIFIEDBY varchar(99);
-- End SAM-2259
9 changes: 9 additions & 0 deletions reference/docs/conversion/sakai_11_oracle_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,12 @@ INSERT INTO SAKAI_SITE_TOOL VALUES('!user-999', '!user-99', '!user', 'sakai.dash
ALTER TABLE GB_GRADABLE_OBJECT_T MODIFY DUE_DATE TIMESTAMP;
-- End SAK-25385

-- SAM-2259 Optimizing Samigo question pool performance
ALTER TABLE SAM_QUESTIONPOOLITEM_T MODIFY ( ITEMID NUMBER(19) );
CREATE INDEX SAM_IDX_ITEMID ON SAM_QUESTIONPOOLITEM_T (ITEMID);
DROP INDEX SAM_AUTHZ_FUNCTIONID_IDX;
DROP INDEX SAM_AUTHZ_QUALIFIERID_IDX;
CREATE INDEX SAM_IDX_FUNC_QUAL ON SAM_AUTHZDATA_T (FUNCTIONID, QUALIFIERID);
ALTER TABLE SAM_AUTHZDATA_T MODIFY (AGENTID VARCHAR2(99 CHAR));
ALTER TABLE SAM_AUTHZDATA_T MODIFY (LASTMODIFIEDBY VARCHAR2(99 CHAR));
-- End SAM-2259
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
<version name="lockId" />

<property name="agentIdString">
<column name="AGENTID" unique-key="uniqueAuthz" length="255"
<column name="AGENTID" unique-key="uniqueAuthz" length="99"
not-null="true" index="sam_authz_agentId_idx" />
</property>
<property name="functionId">
<column name="FUNCTIONID" unique-key="uniqueAuthz" length="36"
not-null="true" index="sam_authz_functionId_idx" />
not-null="true" index="SAM_IDX_FUNC_QUAL" />
</property>
<property name="qualifierId">
<column name="QUALIFIERID" unique-key="uniqueAuthz" length="36"
not-null="true" index="sam_authz_qualifierId_idx" />
not-null="true" index="SAM_IDX_FUNC_QUAL" />
</property>

<property name="authorizationEffectiveDate" type="date" column="EFFECTIVEDATE" not-null="false" />
<property name="authorizationExpirationDate" type="date" column="EXPIRATIONDATE" not-null="false" />
<property name="lastModifiedBy" type="string" length="255" column="LASTMODIFIEDBY" not-null="true" />
<property name="lastModifiedBy" type="string" length="99" column="LASTMODIFIEDBY" not-null="true" />
<property name="lastModifiedDate" type="date" column="LASTMODIFIEDDATE" not-null="true" />
<property name="isExplicitBoolean" type="boolean" column="ISEXPLICIT" />
</class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<class name="org.sakaiproject.tool.assessment.data.dao.questionpool.QuestionPoolItemData" table="SAM_QUESTIONPOOLITEM_T">
<composite-id>
<key-property name="questionPoolId" column="QUESTIONPOOLID" />
<key-property name="itemId" column="ITEMID" />
<key-property name="itemId" column="ITEMID" type="java.lang.Long" index="SAM_IDX_ITEMID" />
</composite-id>
</class>

Expand Down

0 comments on commit 4342cc7

Please sign in to comment.