[samigo-team] SAM-2102 small hibernate patch

Sam Ottenhoff ottenhoff at longsight.com
Thu Mar 21 08:57:54 PDT 2013


The batch size doesn't seem to matter much as long as it is over 10 or so.
 The basic problem is that Samigo uses lots of one-to-many relationships to
go from one assessment => many sections => many items  (+
feedback/metadata) => many answers (+feedback).  So the batch seems to
allow getting the "many" items all at once instead of individually.   So as
long as the batch-size is large enough to get all answers for an item or
all items for a section, it should be fine.  50 seemed safe and reasonable
to me.

I still can't seem to reduce the queries to SAM_PUBLISHEDITEMMETADATA_T
and SAM_PUBLISHEDITEMFEEDBACK_T.  Samigo seems to load item for every
single possible question at both assessment begin and assessment end.  Does
anyone know how/why they are consulted at the end of the assessment?  That
might be a quick way to cut query volume by another 50% or so.

--Sam


On Thu, Mar 21, 2013 at 12:58 AM, Karen Tsao <ktsao at stanford.edu> wrote:

> The patch looks good to me.
>
> Just have a quick question. How do you decide the batch size?
>
> Thanks,
> Karen
>
> On Wed, Mar 20, 2013 at 1:28 PM, Sam Ottenhoff <ottenhoff at longsight.com>wrote:
>
>> On the latest trunk, taking a 16-question random draw (2 questions each
>> in 8 parts from a 42-question pool) assessment generates about 9886 queries
>> to the database.
>>
>> I uploaded a small patch to the hibernate mapping file that reduced the
>> number of queries for my one attempt down to 1539 queries.
>>
>> Can someone review?
>>
>> https://jira.sakaiproject.org/browse/SAM-2102
>>
>> --Sam
>>
>> _______________________________________________
>> samigo-team mailing list
>> samigo-team at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/samigo-team
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/samigo-team/attachments/20130321/906af508/attachment.html 


More information about the samigo-team mailing list