Turn on batch-fetching for collections in several entities

FEA: ItEr76S18CacheTuning
This commit is contained in:
Diego Pino 2012-03-29 11:32:33 +02:00
parent eb1fadf42b
commit 3b4dcdc79c
9 changed files with 31 additions and 31 deletions

View file

@ -57,7 +57,7 @@
cascade="all,delete-orphan"
inverse="true"
access="field"
sort="org.libreplan.business.advance.entities.AdvanceMeasurementComparator">
sort="org.libreplan.business.advance.entities.AdvanceMeasurementComparator" >
<key column="advance_assignment_id" />
<one-to-many class="org.libreplan.business.advance.entities.AdvanceMeasurement"></one-to-many>
</set>
@ -112,7 +112,7 @@
column="communication_date" />
<!-- Not indexed -->
<set name="nonCalculatedConsolidatedValues" access="field" cascade="none" inverse="true">
<set name="nonCalculatedConsolidatedValues" access="field" cascade="none" inverse="true" batch-size="10">
<key column="advance_measurement_id" />
<one-to-many class="org.libreplan.business.planner.entities.consolidations.NonCalculatedConsolidatedValue" />
</set>

View file

@ -24,20 +24,20 @@
column="last_sequence_code" />
<!-- Index created in a database-object section -->
<set name="exceptions" access="field" cascade="all-delete-orphan">
<set name="exceptions" access="field" cascade="all-delete-orphan" batch-size="10">
<key column="base_calendar_id" />
<one-to-many class="CalendarException" />
</set>
<!-- Index created in a database-object section -->
<list name="calendarDataVersions" access="field" cascade="all-delete-orphan">
<list name="calendarDataVersions" access="field" cascade="all-delete-orphan" batch-size="10">
<key column="base_calendar_id" />
<index column="position_in_calendar" />
<one-to-many class="CalendarData" />
</list>
<!-- Not indexed -->
<list name="calendarAvailabilities" access="field" cascade="all-delete-orphan" lazy="false">
<list name="calendarAvailabilities" access="field" cascade="all-delete-orphan" lazy="false" batch-size="10">
<key column="base_calendar_id" />
<index column="position_in_calendar" />
<one-to-many class="CalendarAvailability" />

View file

@ -86,7 +86,7 @@
<property name="ldapSearchQuery" column="ldap_search_query"/>
<property name="ldapGroupStrategy" column="ldap_group_strategy"/>
<set name="configurationRolesLdap" table="configuration_roles_ldap" lazy="false">
<set name="configurationRolesLdap" table="configuration_roles_ldap" lazy="false" batch-size="10">
<key column="id_configuration" />
<composite-element class="ConfigurationRolesLDAP">
<property name="roleLdap" column="role_ldap"

View file

@ -20,7 +20,7 @@
<property name="enabled"/>
<!-- Indexed the other side -->
<set name="hourCosts" inverse="true" cascade="all-delete-orphan">
<set name="hourCosts" inverse="true" cascade="all-delete-orphan" batch-size="10">
<key column="cost_category_id"/>
<one-to-many class="HourCost"/>
</set>
@ -106,4 +106,4 @@
index="idx_resource_costcategory_assigment_on_resource"/>
</class>
</hibernate-mapping>
</hibernate-mapping>

View file

@ -21,7 +21,7 @@
index="idx_label_on_label_type"/>
</properties>
<set name="orderElements" table="order_element_label" cascade="none" inverse="true">
<set name="orderElements" table="order_element_label" cascade="none" inverse="true" batch-size="10">
<key column="label_id" not-null="false"/>
<many-to-many column="order_element_id" class="org.libreplan.business.orders.entities.OrderElement"/>
</set>
@ -46,7 +46,7 @@
column="last_label_sequence_code" />
<!-- Indexed the other side -->
<set name="labels" inverse="false" cascade="all-delete-orphan">
<set name="labels" inverse="false" cascade="all-delete-orphan" batch-size="10">
<cache usage="nonstrict-read-write"/>
<key column="label_type_id"/>
<one-to-many class="Label"/>

View file

@ -68,7 +68,7 @@
column="last_material_sequence_code" />
<!-- Indexed the other side -->
<set name="subcategories" inverse="true" cascade="all-delete-orphan">
<set name="subcategories" inverse="true" cascade="all-delete-orphan" batch-size="10">
<key column="parent_id"/>
<one-to-many class="MaterialCategory"/>
</set>
@ -80,7 +80,7 @@
index="idx_material_category_on_parent"/>
<!-- Indexed the other side -->
<set name="materials" inverse="true" cascade="all-delete-orphan">
<set name="materials" inverse="true" cascade="all-delete-orphan" batch-size="10">
<key column="category_id"/>
<one-to-many class="Material"/>
</set>

View file

@ -21,30 +21,30 @@
column="dirty_last_advance_measurement_for_spreading" />
<!-- Indexed the other side -->
<set name="directAdvanceAssignments" access="field" cascade="all,delete-orphan" inverse="true">
<set name="directAdvanceAssignments" access="field" cascade="all,delete-orphan" inverse="true" batch-size="10">
<key column="direct_order_element_id" />
<one-to-many class="org.libreplan.business.advance.entities.DirectAdvanceAssignment" />
</set>
<set name="labels" table="order_element_label" cascade="none">
<set name="labels" table="order_element_label" cascade="none" batch-size="10">
<key column="order_element_id" not-null="true"/>
<many-to-many column="label_id" class="org.libreplan.business.labels.entities.Label"/>
</set>
<!-- Indexed the other side -->
<set name="criterionRequirements" access="field" cascade="all,delete-orphan" inverse="true">
<set name="criterionRequirements" access="field" cascade="all,delete-orphan" inverse="true" batch-size="10">
<key column="order_element_id" not-null="false"></key>
<one-to-many class="org.libreplan.business.requirements.entities.CriterionRequirement"/>
</set>
<!-- Indexed the other side -->
<set name="materialAssignments" cascade="all-delete-orphan" inverse="true">
<set name="materialAssignments" cascade="all-delete-orphan" inverse="true" batch-size="10">
<key column="order_element_id" not-null="true" />
<one-to-many class="org.libreplan.business.materials.entities.MaterialAssignment" />
</set>
<!-- Indexed the other side -->
<set name="taskQualityForms" cascade="all-delete-orphan" inverse="true">
<set name="taskQualityForms" cascade="all-delete-orphan" inverse="true" batch-size="10">
<key column="order_element_id" not-null="true" />
<one-to-many class="org.libreplan.business.qualityforms.entities.TaskQualityForm" />
</set>
@ -91,7 +91,7 @@
</list>
<!-- Indexed the other side -->
<set name="indirectAdvanceAssignments" access="field" cascade="all,delete-orphan" inverse="true">
<set name="indirectAdvanceAssignments" access="field" cascade="all,delete-orphan" inverse="true" batch-size="10">
<key column="indirect_order_element_id" />
<one-to-many class="org.libreplan.business.advance.entities.IndirectAdvanceAssignment" />
</set>
@ -132,7 +132,7 @@
<many-to-one name="calendar" column="base_calendar_id" cascade="none"
class="org.libreplan.business.calendars.entities.BaseCalendar"/>
<set name="orderAuthorizations" cascade="all-delete-orphan" inverse="true" >
<set name="orderAuthorizations" cascade="all-delete-orphan" inverse="true" batch-size="10">
<key column="order_id" />
<one-to-many class="org.libreplan.business.users.entities.OrderAuthorization" />
</set>
@ -169,7 +169,7 @@
<key column="order_element_id"></key>
<!-- Indexed the other side -->
<set name="hoursGroups" access="field" cascade="all,delete-orphan" inverse="true">
<set name="hoursGroups" access="field" cascade="all,delete-orphan" inverse="true" batch-size="10">
<key column="parent_order_line" not-null="false"></key>
<one-to-many class="HoursGroup" />
</set>
@ -203,7 +203,7 @@
<property name="fixedPercentage" column="fixed_percentage" access="field" />
<!-- Indexed the other side -->
<set name="criterionRequirements" access="field" cascade="save-update,delete-orphan" inverse="true">
<set name="criterionRequirements" access="field" cascade="save-update,delete-orphan" inverse="true" batch-size="10">
<key column="hours_group_id" not-null="false"></key>
<one-to-many class="org.libreplan.business.requirements.entities.CriterionRequirement"/>
</set>
@ -248,7 +248,7 @@
<one-to-one name="task" class="org.libreplan.business.planner.entities.TaskElement"
constrained="true" cascade="delete" access="field" lazy="false"/>
<set name="hoursGroups" table="task_source_hours_groups" cascade="none" inverse="false" access="field">
<set name="hoursGroups" table="task_source_hours_groups" cascade="none" inverse="false" access="field" batch-size="10">
<key column="task_source_id"></key>
<many-to-many class="HoursGroup" column="hours_group_id"/>
</set>

View file

@ -37,7 +37,7 @@
<many-to-one class="org.libreplan.business.resources.entities.Criterion" column="criterion_id" name="criterion"/>
<subclass discriminator-value="direct" name="DirectCriterionRequirement">
<set access="field" name="children" cascade="delete-orphan" inverse="true">
<set access="field" name="children" cascade="delete-orphan" inverse="true" batch-size="10">
<key column="parent"/>
<one-to-many class="IndirectCriterionRequirement"/>

View file

@ -30,13 +30,13 @@
</property>
<!-- Not indexed -->
<set name="workReportLabelTypeAssigments" cascade="all-delete-orphan">
<set name="workReportLabelTypeAssigments" cascade="all-delete-orphan" batch-size="10">
<key column="work_report_type_id"/>
<one-to-many class="WorkReportLabelTypeAssigment"/>
</set>
<!-- Not indexed -->
<set name="headingFields" table="heading_field">
<set name="headingFields" table="heading_field" batch-size="10">
<key column="heading_id"/>
<composite-element class="org.libreplan.business.workreports.valueobjects.DescriptionField">
<property name="fieldName"/>
@ -46,7 +46,7 @@
</set>
<!-- Not indexed -->
<set name="lineFields" table="line_field">
<set name="lineFields" table="line_field" batch-size="10">
<key column="heading_id"/>
<composite-element class="org.libreplan.business.workreports.valueobjects.DescriptionField">
<property name="fieldName"/>
@ -86,20 +86,20 @@
column="order_element_id" index="idx_order_element_on_work_report" />
<!-- Not indexed -->
<set name="labels" table="workreports_labels">
<set name="labels" table="workreports_labels" batch-size="10">
<key column="work_report_id"/>
<many-to-many column="label_id"
class="org.libreplan.business.labels.entities.Label"/>
</set>
<!-- Indexed on the other side -->
<set name="workReportLines" cascade="all-delete-orphan" inverse="true">
<set name="workReportLines" cascade="all-delete-orphan" inverse="true" batch-size="10">
<key column="work_report_id"/>
<one-to-many class="WorkReportLine"/>
</set>
<!-- Not indexed -->
<set name="descriptionValues" table="description_values">
<set name="descriptionValues" table="description_values" batch-size="10">
<key column="description_value_id"/>
<composite-element class="org.libreplan.business.workreports.valueobjects.DescriptionValue">
<property name="fieldName"/>
@ -147,14 +147,14 @@
index="idx_type_of_work_hours_on_work_report_line" />
<!-- Not indexed -->
<set name="labels" table="workreportslines_labels">
<set name="labels" table="workreportslines_labels" batch-size="10">
<key column="work_report_line_id"/>
<many-to-many column="label_id"
class="org.libreplan.business.labels.entities.Label"/>
</set>
<!-- Not indexed -->
<set name="descriptionValues" table="description_values_in_line">
<set name="descriptionValues" table="description_values_in_line" batch-size="10">
<key column="description_value_id"/>
<composite-element class="org.libreplan.business.workreports.valueobjects.DescriptionValue">
<property name="fieldName" column="field_name" />