-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Performance Problem bei insert/update
PostPosted: Tue Jan 29, 2008 12:59 pm 
Newbie

Joined: Tue Jan 29, 2008 12:48 pm
Posts: 2
[b]Hibernate version:3.2.2[/b]

Hallo, ich habe ein Insert/update (Performance) Problem. Zur Geschäftsobjektdefinition habe ich massiv gebrauch von Cascadings (cascade-all) gemacht. Inhaltlich funktioniert das ganze auch wunderbar. Nur beim "kopieren" von den so definierten Gschäftsobjekten (~40000 Rows) vergeht sehr viel Zeit, weil Hibernate in Oracle folgende gigantische Query absetzt und für jede Row (bei insert) einmal ausführt/aktualisiert?


Es dabei läuft bei folgendes SQL ab:


select persistent0_.uuid as uuid0_, persistent0_.internalLock as
internal2_0_, persistent0_.DATA_SOURCE_UUID as DATA3_0_,
persistent0_1_.refValue1 as refValue2_1_,
persistent0_1_.refValue2 as refValue3_1_,
persistent0_1_.projectValue2 as projectV4_1_,
persistent0_1_.projectValue1 as projectV5_1_,
persistent0_1_.COST_CENTER_UUID as COST6_1_,
persistent0_1_.HARDWARE_TYPE_UUID as HARDWARE7_1_,
persistent0_1_.DEVISION_GROUP_UUID as DEVISION8_1_,
persistent0_1_.FUNCTION_TYPE_UUID as FUNCTION9_1_,
persistent0_1_.PRODUCTION_TYPE_UUID as PRODUCTION10_1_,
persistent0_1_.PLANNING_UUID as PLANNING11_1_,
persistent0_2_.acl as acl2_, persistent0_2_.CREATED_UUID as
CREATED3_2_, persistent0_2_.SAVED_UUID as SAVED4_2_,
persistent0_2_.LOCKED_UUID as LOCKED5_2_,
persistent0_2_.LOCK_STATUS_UUID as LOCK6_2_,
persistent0_3_.name as name3_, persistent0_3_.description as
descript3_3_, persistent0_3_.OBJECT_TYPE_UUID as OBJECT4_3_,
persistent0_3_.FOLDER_UUID as FOLDER5_3_,
persistent0_3_.CURRENT_PROPERTY_SET_UUID as CURRENT6_3_,
persistent0_4_.REV_ITEM_UUID as REV2_4_,
persistent0_4_.BOM_UUID as BOM3_4_, persistent0_5_.OWNER_UUID
as OWNER2_5_, persistent0_6_.isDefault as isDefault6_,
persistent0_6_.isLatestRev as isLatest3_6_,
persistent0_6_.revId as revId6_, persistent0_6_.PRE_REV_UUID
as PRE5_6_, persistent0_6_.CURRENT_RELEASE_OBJ_UUID as
CURRENT6_6_, persistent0_6_.FIRST_REV_UUID as FIRST7_6_,
persistent0_6_.REVISED_UUID as REVISED8_6_,
persistent0_6_.ITEM_UUID as ITEM9_6_,
persistent0_7_.engineNewZP4 as engineNe2_7_,
persistent0_7_.eptNewZP7 as eptNewZP3_7_,
persistent0_7_.engineNewZP7 as engineNe4_7_,
persistent0_7_.eptNewZP4 as eptNewZP5_7_,
persistent0_7_.powerTrainKnown as powerTra6_7_,
persistent0_7_.ENGINE_UUID as ENGINE7_7_,
persistent0_7_.REGION_UUID as REGION8_7_,
persistent0_7_.POWER_TRAIN_UUID as POWER9_7_,
persistent0_7_.EMISSION_STD_UUID as EMISSION10_7_,
persistent0_7_.INFLUENCES_UUID as INFLUENCES11_7_,
persistent0_8_.name as name8_, persistent0_8_.UE_MODEL_UUID
as UE3_8_, persistent0_8_.AWS100P_PROJECT_UUID as AWS4_8_,
persistent0_9_.OWNER_UUID as OWNER2_9_,
persistent0_9_.REV_ITEM_UUID as REV3_9_,
persistent0_11_.EPT_MODEL_UUID as EPT2_11_,
persistent0_13_.type as type13_,
persistent0_13_.EPT_MODEL_UUID as EPT3_13_,
persistent0_14_.type as type14_,
persistent0_14_.EPT_MODEL_UUID as EPT3_14_,
persistent0_15_.EPT_MODEL_UUID as EPT2_15_,
persistent0_15_.AWS100P_PROJECT_UUID as AWS3_15_,
persistent0_16_.abbr as abbr16_, persistent0_16_.costUnit as
costUnit16_, persistent0_16_.EPT_MODEL_UUID as EPT4_16_,
persistent0_18_.UE_MODEL_UUID as UE2_18_,
persistent0_19_.UE_MODEL_UUID as UE2_19_,
persistent0_20_.UE_MODEL_UUID as UE2_20_,
persistent0_21_.UE_MODEL_UUID as UE2_21_,
persistent0_22_.GEAR_UUID as GEAR2_22_,
persistent0_22_.UE_MODEL_UUID as UE3_22_,
persistent0_22_.DRIVE_UUID as DRIVE4_22_,
persistent0_23_.UE_MODEL_UUID as UE2_23_,
persistent0_24_.EFFORT_TYPES_UUID as EFFORT2_24_,
persistent0_24_.CHILDREN_UUID as CHILDREN3_24_,
persistent0_24_.SCOPE_UUID as SCOPE4_24_,
persistent0_24_.PPMS_MODEL_UUID as PPMS5_24_,
persistent0_25_.PROJECT_UUID as PROJECT2_25_,
persistent0_25_.PPMS_MODEL_UUID as PPMS3_25_,
persistent0_26_.erpId as erpId26_, persistent0_26_.no as
no26_, persistent0_26_.PROJECT_UUID as PROJECT4_26_,
persistent0_26_.CHILDREN_UUID as CHILDREN5_26_,
persistent0_26_.RESPONSIBLE_UUID as RESPONSI6_26_,
persistent0_26_.HOURLY_RATES_UUID as HOURLY7_26_,
persistent0_26_.ORGA_UUID as ORGA8_26_,
persistent0_27_.PROJECT_UUID as PROJECT2_27_,
persistent0_27_.EFFORT_TYPES_UUID as EFFORT3_27_,
persistent0_27_.COST_CENTER_UUID as COST4_27_,
persistent0_28_.valueValue as valueValue28_,
persistent0_28_.valueUnit as valueUnit28_,
persistent0_28_.valueFormula as valueFor4_28_,
persistent0_28_.PROJECT_UUID as PROJECT5_28_,
persistent0_28_.RATE_UUID as RATE6_28_,
persistent0_28_.COST_TYPE_UUID as COST7_28_,
persistent0_29_.effortEditable as effortEd2_29_,
persistent0_29_.costEditable as costEdit3_29_,
persistent0_29_.PROJECT_UUID as PROJECT4_29_,
persistent0_29_.EFFORT_TYPE_CLASS_UUID as EFFORT5_29_,
persistent0_29_.PPMS_MODEL_UUID as PPMS6_29_,
persistent0_30_.PPMS_MODEL_UUID as PPMS2_30_,
persistent0_31_.SCOPE_UUID as SCOPE2_31_,
persistent0_31_.PPMS_MODEL_UUID as PPMS3_31_,
persistent0_32_.valueValue as valueValue32_,
persistent0_32_.valueUnit as valueUnit32_,
persistent0_32_.valueFormula as valueFor4_32_,
persistent0_32_.fractionFormula as fraction5_32_,
persistent0_32_.fractionUnit as fraction6_32_,
persistent0_32_.fractionValue as fraction7_32_,
persistent0_32_.HOURLY_RATE_SYSTEM_UUID as HOURLY8_32_,
persistent0_33_.COST_CENTER_UUID as COST2_33_,
persistent0_34_.TIME_LINE_MODEL_UUID as TIME2_34_,
persistent0_35_.ROOTCC_UUID as ROOTCC2_35_,
persistent0_37_.unitDefinition as unitDefi2_37_,
persistent0_37_.steps as steps37_,
persistent0_37_.PROJECT_UUID as PROJECT4_37_,
persistent0_37_.TIME_LINE_MODEL_UUID as TIME5_37_,
persistent0_41_.amountUnit as amountUnit41_,
persistent0_41_.amountFormula as amountFo3_41_,
persistent0_41_.amountValue as amountVa4_41_,
persistent0_41_.EFFORT_UUID as EFFORT5_41_,
persistent0_42_.hasTimeLine as hasTimeL2_42_,
persistent0_42_.pspCode as pspCode42_,
persistent0_42_.TIME_LINE_UUID as TIME4_42_,
persistent0_42_.RESPONSIBLE_UUID as RESPONSI5_42_,
persistent0_42_.CREATOR_UUID as CREATOR6_42_,
persistent0_42_.SOURCE_UUID as SOURCE7_42_,
persistent0_43_.blockedFormula as blockedF2_43_,
persistent0_43_.activeFormula as activeFo3_43_,
persistent0_43_.blockedValue as blockedV4_43_,
persistent0_43_.endDate as endDate43_,
persistent0_43_.detailDesc as detailDesc43_,
persistent0_43_.activeValue as activeVa7_43_,
persistent0_43_.useable as useable43_,
persistent0_43_.amountFixed as amountFi9_43_,
persistent0_43_.startDate as startDate43_,
persistent0_43_.CHILDREN_UUID as CHILDREN11_43_,
persistent0_43_.ACTIVITY_TYPE_UUID as ACTIVITY12_43_,
persistent0_43_.PROJECT_UUID as PROJECT13_43_,
persistent0_44_.valueValue as valueValue44_,
persistent0_44_.valueUnit as valueUnit44_,
persistent0_44_.valueFormula as valueFor4_44_,
persistent0_44_.PROJECT_UUID as PROJECT5_44_,
persistent0_44_.COST_CENTER_UUID as COST6_44_,
persistent0_44_.COST_TYPE_OCCURRANCE_UUID as COST7_44_,
persistent0_44_.ACTIVITY_RES_ASSOC_UUID as ACTIVITY8_44_,
persistent0_45_.valueValue as valueValue45_,
persistent0_45_.reducedValueValue as reducedV3_45_,
persistent0_45_.reductionFactorValue as reductio4_45_,
persistent0_45_.komplexityFormula as komplexi5_45_,
persistent0_45_.unit as unit45_, persistent0_45_.valueUnit as
valueUnit45_, persistent0_45_.basisValueUnit as basisVal8_45_,
persistent0_45_.komplexityValue as komplexi9_45_,
persistent0_45_.reducedValueUnit as reduced10_45_,
persistent0_45_.reductionFactorFormula as reducti11_45_,
persistent0_45_.komplexityUnit as komplex12_45_,
persistent0_45_.reductionFactorUnit as reducti13_45_,
persistent0_45_.CBVFormula as CBVFormula45_,
persistent0_45_.CBVUnit as CBVUnit45_,
persistent0_45_.valueFormula as valueFo16_45_,
persistent0_45_.basisValueFormula as basisVa17_45_,
persistent0_45_.reducedValueFormula as reduced18_45_,
persistent0_45_.CBVValue as CBVValue45_,
persistent0_45_.basisValueValue as basisVa20_45_,
persistent0_45_.EFFORT_VARIANT_UUID as EFFORT21_45_,
persistent0_45_.ACTIVITY_UUID as ACTIVITY22_45_,
persistent0_45_.EFFORT_TYPE_UUID as EFFORT23_45_,
persistent0_46_.acl as acl46_, persistent0_46_.FUNCTION_UUID
as FUNCTION3_46_, persistent0_46_.PROJECT_UUID as
PROJECT4_46_, persistent0_47_.simulation as simulation47_,
persistent0_47_.privateSandbox as privateS3_47_,
persistent0_47_.toDate as toDate47_,
persistent0_47_.releasedTemplate as released5_47_,
persistent0_47_.fromDate as fromDate47_,
persistent0_47_.calculated as calculated47_,
persistent0_47_.TIME_LINE_MODEL_UUID as TIME8_47_,
persistent0_47_.DERIVED_FROM_UUID as DERIVED9_47_,
persistent0_47_.ROOT_ACTIVITY_UUID as ROOT10_47_,
persistent0_47_.PPMS_MODEL_UUID as PPMS11_47_,
persistent0_47_.ORGA_UUID as ORGA12_47_,
persistent0_47_.TIME_LINE_DEFINITION_UUID as TIME13_47_,
persistent0_48_.awsVersion as awsVersion48_,
persistent0_48_.sop as sop48_, persistent0_48_.awsNo as
awsNo48_, persistent0_48_.eaNo as eaNo48_,
persistent0_48_.PRODUCT_LINE_UUID as PRODUCT6_48_,
persistent0_48_.DERIVED_UUID as DERIVED7_48_,
persistent0_48_.CURRENT_INFLUENCES_UUID as CURRENT8_48_,
persistent0_48_.CURRENT_PLANNING_UUID as CURRENT9_48_,
persistent0_49_.OWNER_UUID as OWNER2_49_,
persistent0_49_.TIME_LINE_DEFINITION_UUID as TIME3_49_,
persistent0_50_.LINKED_RELEASE_TYPES_UUID as LINKED2_50_,
persistent0_50_.VALID_OBJECT_TYPE_UUID as VALID3_50_,
persistent0_51_.name as name51_, persistent0_51_.description
as descript3_51_, persistent0_52_.FROM_LINK_UUID as FROM2_52_,
persistent0_52_.TO_LINK_UUID as TO3_52_,
persistent0_53_.valueUnit as valueUnit53_,
persistent0_53_.valueValue as valueValue53_,
persistent0_53_.valueType as valueType53_,
persistent0_53_.valueName as valueName53_,
persistent0_53_.PROPERTY_SET_UUID as PROPERTY6_53_,
persistent0_54_.currentRole as currentR2_54_,
persistent0_54_.name as name54_, persistent0_54_.description
as descript4_54_, persistent0_54_.DISPLAY_OBJECT_UUID as
DISPLAY5_54_, persistent0_55_.BOM_UUID as BOM2_55_,
persistent0_55_.OBJECT_TYPE_UUID as OBJECT3_55_,
persistent0_56_.value as value56_, persistent0_56_.lang as
lang56_, persistent0_56_.key as key56_,
persistent0_56_.DISPLAY_OBJECT_UUID as DISPLAY5_56_,
persistent0_57_.FOLDER_UUID as FOLDER2_57_,
persistent0_57_.OBJECT_TYPE_UUID as OBJECT3_57_,
persistent0_58_.text as text58_, persistent0_58_.source_uuid
as source3_58_, persistent0_58_.sourceType as sourceType58_,
persistent0_58_.serializedValues as serializ5_58_,
persistent0_58_.SAVED_UUID as SAVED6_58_,
persistent0_59_.itemId as itemId59_,
persistent0_60_.CREATED_UUID as CREATED2_60_,
persistent0_60_.FOLDER_UUID as FOLDER3_60_,
persistent0_60_.DISPLAY_OBJECT_UUID as DISPLAY4_60_,
persistent0_60_.LINK_TYPE_UUID as LINK5_60_,
persistent0_61_.name as name61_, persistent0_62_.logReason as
logReason62_, persistent0_62_.logDate as logDate62_,
persistent0_62_.role as role62_, persistent0_62_.CREATOR_UUID
as CREATOR5_62_, persistent0_63_.conditionFormula as
conditio2_63_, persistent0_63_.conditionValue as
conditio3_63_, persistent0_63_.conditionUnit as conditio4_63_,
persistent0_63_.SOURCE_UUID as SOURCE5_63_,
persistent0_63_.ACTIVITY_UUID as ACTIVITY6_63_,
persistent0_64_.userText as userText64_,
persistent0_64_.EFFORT_TYPE_UUID as EFFORT3_64_,
persistent0_64_.CALC_BASE_UUID as CALC4_64_,
persistent0_65_.t100pValueExtern2 as t2_65_,
persistent0_65_.amountFormula2 as amountFo3_65_,
persistent0_65_.TEMAT1 as TEMAT4_65_, persistent0_65_.TEMAT2
as TEMAT5_65_, persistent0_65_.TSum2 as TSum6_65_,
persistent0_65_.TSum1 as TSum7_65_, persistent0_65_.TVMAT2 as
TVMAT8_65_, persistent0_65_.TVMAT1 as TVMAT9_65_,
persistent0_65_.HEffort2 as HEffort10_65_,
persistent0_65_.HEffort1 as HEffort11_65_,
persistent0_65_.PRedFactor2 as PRedFactor12_65_,
persistent0_65_.PRedFactor1 as PRedFactor13_65_,
persistent0_65_.t100pValue2 as t14_65_,
persistent0_65_.TRedSum2 as TRedSum15_65_,
persistent0_65_.PSum1 as PSum16_65_, persistent0_65_.PSum2 as
PSum17_65_, persistent0_65_.TEffort2 as TEffort18_65_,
persistent0_65_.TEffort1 as TEffort19_65_,
persistent0_65_.h100pValueExtern1 as h20_65_,
persistent0_65_.amountFormula1 as amountF21_65_,
persistent0_65_.h100pValue2 as h22_65_,
persistent0_65_.TPVSum2 as TPVSum23_65_,
persistent0_65_.amountValue1 as amountV24_65_,
persistent0_65_.TPVSum1 as TPVSum25_65_,
persistent0_65_.t100pValueExtern1 as t26_65_,
persistent0_65_.amountValue2 as amountV27_65_,
persistent0_65_.TEffortExtern1 as TEffort28_65_,
persistent0_65_.TEffortExtern2 as TEffort29_65_,
persistent0_65_.TRedEMAT2 as TRedEMAT30_65_,
persistent0_65_.TRedEMAT1 as TRedEMAT31_65_,
persistent0_65_.TRedSum1 as TRedSum32_65_,
persistent0_65_.h100pValue1 as h33_65_,
persistent0_65_.h100pValueExtern2 as h34_65_,
persistent0_65_.comment2 as comment35_65_,
persistent0_65_.TRedVMAT2 as TRedVMAT36_65_,
persistent0_65_.TRedVMAT1 as TRedVMAT37_65_,
persistent0_65_.comment1 as comment38_65_,
persistent0_65_.TSupplierSum2 as TSuppli39_65_,
persistent0_65_.TSupplierSum1 as TSuppli40_65_,
persistent0_65_.HEffortExtern1 as HEffort41_65_,
persistent0_65_.HEffortExtern2 as HEffort42_65_,
persistent0_65_.t100pValue1 as t43_65_,
persistent0_66_.extentFraction2 as extentFr2_66_,
persistent0_66_.extentFraction1 as extentFr3_66_,
persistent0_66_.extentExtern2 as extentEx4_66_,
persistent0_66_.defaultExtern2 as defaultE5_66_,
persistent0_66_.extentExtern1 as extentEx6_66_,
persistent0_66_.defaultFraction2 as defaultF7_66_,
persistent0_66_.defaultFraction1 as defaultF8_66_,
persistent0_66_.defaultExtern1 as defaultE9_66_,
persistent0_66_.PPlatformFraction2 as PPlatfo10_66_,
persistent0_66_.PPlatformFraction1 as PPlatfo11_66_,
persistent0_66_.TPlatformFraction2 as TPlatfo12_66_,
persistent0_66_.TPlatformFraction1 as TPlatfo13_66_,
persistent0_67_.PInfluence1 as PInfluence2_67_,
persistent0_67_.PScalDefault2 as PScalDef3_67_,
persistent0_67_.PScaleFactor2 as PScaleFa4_67_,
persistent0_67_.PScaleFactor1 as PScaleFa5_67_,
persistent0_67_.PScalDefault1 as PScalDef6_67_,
persistent0_67_.PScalLower1 as PScalLower7_67_,
persistent0_67_.PScalLower2 as PScalLower8_67_,
persistent0_67_.PInfluence2 as PInfluence9_67_,
persistent0_67_.PScalUpper2 as PScalUpper10_67_,
persistent0_67_.PScalUpper1 as PScalUpper11_67_,
persistent0_68_.HPV122 as HPV2_68_, persistent0_68_.HPV121 as
HPV3_68_, persistent0_68_.TPV12Extern2 as TPV4_68_,
persistent0_68_.TPV12Extern1 as TPV5_68_,
persistent0_68_.TPV122 as TPV6_68_, persistent0_68_.TPV121 as
TPV7_68_, persistent0_68_.HPV12Extern2 as HPV8_68_,
persistent0_68_.HPV12Extern1 as HPV9_68_,
persistent0_69_.blockedFormula as blockedF2_69_,
persistent0_69_.activeFormula as activeFo3_69_,
persistent0_69_.blockedValue as blockedV4_69_,
persistent0_69_.activeValue as activeVa5_69_,
persistent0_69_.transitive as transitive69_,
persistent0_69_.LINK_UUID as LINK7_69_,
persistent0_69_.ACTIVITY_UUID as ACTIVITY8_69_,
persistent0_70_.step as step70_,
persistent0_70_.TIME_LINE_DEFINITION_UUID as TIME3_70_,
persistent0_70_.MILESTONE_DEFINITION_UUID as MILESTONE4_70_,
persistent0_71_.valueValue as valueValue71_,
persistent0_71_.valueMatValue as valueMat3_71_,
persistent0_71_.valueUnit as valueUnit71_,
persistent0_71_.fractionFormula as fraction5_71_,
persistent0_71_.fractionMatValue as fraction6_71_,
persistent0_71_.fractionValue as fraction7_71_,
persistent0_71_.fractionUnit as fraction8_71_,
persistent0_71_.valueMatUnit as valueMat9_71_,
persistent0_71_.step as step71_, persistent0_71_.valueFormula
as valueFo11_71_, persistent0_71_.valueMatFormula as
valueMa12_71_, persistent0_71_.fractionMatUnit as
fractio13_71_, persistent0_71_.fractionMatFormula as
fractio14_71_, persistent0_71_.TIME_LINE_UUID as TIME15_71_,
persistent0_72_.RELEASED_UUID as RELEASED2_72_,
persistent0_72_.PRE_RELEASE_OBJ_UUID as PRE3_72_,
persistent0_72_.REV_ITEM_UUID as REV4_72_,
persistent0_72_.RELEASE_TYPE_UUID as RELEASE5_72_,
persistent0_73_.account as account73_, persistent0_73_.name
as name73_, case when persistent0_11_.UUID is not null then
11 when persistent0_12_.UUID is not null then 12 when
persistent0_13_.UUID is not null then 13 when
persistent0_14_.UUID is not null then 14 when
persistent0_15_.UUID is not null then 15 when
persistent0_16_.UUID is not null then 16 when
persistent0_17_.UUID is not null then 17 when
persistent0_18_.UUID is not null then 18 when
persistent0_19_.UUID is not null then 19 when
persistent0_20_.UUID is not null then 20 when
persistent0_21_.UUID is not null then 21 when
persistent0_22_.UUID is not null then 22 when
persistent0_23_.UUID is not null then 23 when
persistent0_24_.UUID is not null then 24 when
persistent0_25_.UUID is not null then 25 when
persistent0_26_.UUID is not null then 26 when
persistent0_27_.UUID is not null then 27 when
persistent0_28_.UUID is not null then 28 when
persistent0_29_.UUID is not null then 29 when
persistent0_30_.UUID is not null then 30 when
persistent0_31_.UUID is not null then 31 when
persistent0_32_.UUID is not null then 32 when
persistent0_33_.UUID is not null then 33 when
persistent0_34_.UUID is not null then 34 when
persistent0_35_.UUID is not null then 35 when
persistent0_36_.UUID is not null then 36 when
persistent0_37_.UUID is not null then 37 when
persistent0_38_.UUID is not null then 38 when
persistent0_39_.UUID is not null then 39 when
persistent0_43_.UUID is not null then 43 when
persistent0_44_.UUID is not null then 44 when
persistent0_45_.UUID is not null then 45 when
persistent0_48_.UUID is not null then 48 when
persistent0_7_.UUID is not null then 7 when
persistent0_8_.UUID is not null then 8 when
persistent0_9_.UUID is not null then 9 when
persistent0_10_.UUID is not null then 10 when
persistent0_40_.UUID is not null then 40 when
persistent0_41_.UUID is not null then 41 when
persistent0_42_.UUID is not null then 42 when
persistent0_46_.UUID is not null then 46 when
persistent0_47_.UUID is not null then 47 when
persistent0_49_.UUID is not null then 49 when
persistent0_50_.UUID is not null then 50 when
persistent0_4_.UUID is not null then 4 when
persistent0_5_.UUID is not null then 5 when
persistent0_6_.UUID is not null then 6 when
persistent0_52_.UUID is not null then 52 when
persistent0_3_.UUID is not null then 3 when
persistent0_51_.UUID is not null then 51 when
persistent0_53_.UUID is not null then 53 when
persistent0_54_.UUID is not null then 54 when
persistent0_66_.UUID is not null then 66 when
persistent0_67_.UUID is not null then 67 when
persistent0_68_.UUID is not null then 68 when
persistent0_65_.UUID is not null then 65 when
persistent0_1_.UUID is not null then 1 when
persistent0_2_.UUID is not null then 2 when
persistent0_55_.UUID is not null then 55 when
persistent0_56_.UUID is not null then 56 when
persistent0_57_.UUID is not null then 57 when
persistent0_58_.UUID is not null then 58 when
persistent0_59_.UUID is not null then 59 when
persistent0_60_.UUID is not null then 60 when
persistent0_61_.UUID is not null then 61 when
persistent0_62_.UUID is not null then 62 when
persistent0_63_.UUID is not null then 63 when
persistent0_64_.UUID is not null then 64 when
persistent0_69_.UUID is not null then 69 when
persistent0_70_.UUID is not null then 70 when
persistent0_71_.UUID is not null then 71 when
persistent0_72_.UUID is not null then 72 when
persistent0_73_.UUID is not null then 73 when
persistent0_.uuid is not null then 0 end as clazz_
from PERSISTENT persistent0_, LINE persistent0_1_, APP_OBJECT
persistent0_2_, DISPLAY_OBJECT persistent0_3_, BOM_LINE
persistent0_4_, FOLDER persistent0_5_, REV_ITEM
persistent0_6_, EPT_USAGE persistent0_7_, INFLUENCES
persistent0_8_, BOM persistent0_9_, BASE_OBJ persistent0_10_,
DEVISION_GROUP persistent0_11_, EPT_MODEL persistent0_12_,
FUNCTION_TYPE persistent0_13_, HARDWARE_TYPE persistent0_14_,
PLANNING persistent0_15_, PRODUCTION_TYPE persistent0_16_,
PRODUCT_LINE persistent0_17_, DRIVE persistent0_18_,
EMISSION_STD persistent0_19_, ENGINE persistent0_20_, GEAR
persistent0_21_, POWER_TRAIN persistent0_22_, REGION
persistent0_23_, ACTIVITY_TYPE persistent0_24_,
BUSINESS_FUNCTION persistent0_25_, COST_CENTER
persistent0_26_, COST_TYPE persistent0_27_,
COST_TYPE_OCCURRANCE persistent0_28_, EFFORT_TYPE
persistent0_29_, EFFORT_TYPE_CLASS persistent0_30_,
EFFORT_VARIANT persistent0_31_, HOURLY_RATE persistent0_32_,
HOURLY_RATE_SYSTEM persistent0_33_, MILESTONE_DEFINITION
persistent0_34_, ORGA persistent0_35_, PPMS_MODEL
persistent0_36_, TIME_LINE_DEFINITION persistent0_37_,
TIME_LINE_MODEL persistent0_38_, UE_MODEL persistent0_39_,
DATA_SOURCE persistent0_40_, ACTIVITY_RES_ASSOC
persistent0_41_, CALC_BASE persistent0_42_, ACTIVITY
persistent0_43_, COST_TYPE_RES_OCC persistent0_44_, EFFORT
persistent0_45_, PROCESSACL persistent0_46_, PROJECT
persistent0_47_, AWS100P_PROJECT persistent0_48_, TIME_LINE
persistent0_49_, RELEASE_TYPE persistent0_50_, OBJECT_TYPE
persistent0_51_, LINK_TYPE persistent0_52_, PROPERTY
persistent0_53_, PROPERTY_SET persistent0_54_,
BOM_OBJECT_TYPE persistent0_55_, DISPLAY_TEXT persistent0_56_,
FOLDER_OBJECT_TYPE persistent0_57_, HISTORY persistent0_58_,
ITEM persistent0_59_, LINK_OBJECT persistent0_60_,
LOCK_STATUS persistent0_61_, LOG_INFO persistent0_62_,
ACTIVITY_CONDITION persistent0_63_, CALC_DATA persistent0_64_,
AWS100P_PROJECT_VALUES persistent0_65_, AWS100P_COST_VALUES
persistent0_66_, AWS100P_DETAIL_VALUES persistent0_67_,
AWS100P_VALUES persistent0_68_, LINKED_ACTIVITY
persistent0_69_, MILESTONE persistent0_70_, TIME_LINE_STEP
persistent0_71_, RELEASE_OBJ persistent0_72_, USER_INFO
persistent0_73_
where persistent0_.uuid=persistent0_1_.UUID(+)
and persistent0_.uuid=persistent0_2_.UUID(+)
and persistent0_.uuid=persistent0_3_.UUID(+)
and persistent0_.uuid=persistent0_4_.UUID(+)
and persistent0_.uuid=persistent0_5_.UUID(+)
and persistent0_.uuid=persistent0_6_.UUID(+)
and persistent0_.uuid=persistent0_7_.UUID(+)
and persistent0_.uuid=persistent0_8_.UUID(+)
and persistent0_.uuid=persistent0_9_.UUID(+)
and persistent0_.uuid=persistent0_10_.UUID(+)
and persistent0_.uuid=persistent0_11_.UUID(+)
and persistent0_.uuid=persistent0_12_.UUID(+)
and persistent0_.uuid=persistent0_13_.UUID(+)
and persistent0_.uuid=persistent0_14_.UUID(+)
and persistent0_.uuid=persistent0_15_.UUID(+)
and persistent0_.uuid=persistent0_16_.UUID(+)
and persistent0_.uuid=persistent0_17_.UUID(+)
and persistent0_.uuid=persistent0_18_.UUID(+)
and persistent0_.uuid=persistent0_19_.UUID(+)
and persistent0_.uuid=persistent0_20_.UUID(+)
and persistent0_.uuid=persistent0_21_.UUID(+)
and persistent0_.uuid=persistent0_22_.UUID(+)
and persistent0_.uuid=persistent0_23_.UUID(+)
and persistent0_.uuid=persistent0_24_.UUID(+)
and persistent0_.uuid=persistent0_25_.UUID(+)
and persistent0_.uuid=persistent0_26_.UUID(+)
and persistent0_.uuid=persistent0_27_.UUID(+)
and persistent0_.uuid=persistent0_28_.UUID(+)
and persistent0_.uuid=persistent0_29_.UUID(+)
and persistent0_.uuid=persistent0_30_.UUID(+)
and persistent0_.uuid=persistent0_31_.UUID(+)
and persistent0_.uuid=persistent0_32_.UUID(+)
and persistent0_.uuid=persistent0_33_.UUID(+)
and persistent0_.uuid=persistent0_34_.UUID(+)
and persistent0_.uuid=persistent0_35_.UUID(+)
and persistent0_.uuid=persistent0_36_.UUID(+)
and persistent0_.uuid=persistent0_37_.UUID(+)
and persistent0_.uuid=persistent0_38_.UUID(+)
and persistent0_.uuid=persistent0_39_.UUID(+)
and persistent0_.uuid=persistent0_40_.UUID(+)
and persistent0_.uuid=persistent0_41_.UUID(+)
and persistent0_.uuid=persistent0_42_.UUID(+)
and persistent0_.uuid=persistent0_43_.UUID(+)
and persistent0_.uuid=persistent0_44_.UUID(+)
and persistent0_.uuid=persistent0_45_.UUID(+)
and persistent0_.uuid=persistent0_46_.UUID(+)
and persistent0_.uuid=persistent0_47_.UUID(+)
and persistent0_.uuid=persistent0_48_.UUID(+)
and persistent0_.uuid=persistent0_49_.UUID(+)
and persistent0_.uuid=persistent0_50_.UUID(+)
and persistent0_.uuid=persistent0_51_.UUID(+)
and persistent0_.uuid=persistent0_52_.UUID(+)
and persistent0_.uuid=persistent0_53_.UUID(+)
and persistent0_.uuid=persistent0_54_.UUID(+)
and persistent0_.uuid=persistent0_55_.UUID(+)
and persistent0_.uuid=persistent0_56_.UUID(+)
and persistent0_.uuid=persistent0_57_.UUID(+)
and persistent0_.uuid=persistent0_58_.UUID(+)
and persistent0_.uuid=persistent0_59_.UUID(+)
and persistent0_.uuid=persistent0_60_.UUID(+)
and persistent0_.uuid=persistent0_61_.UUID(+)
and persistent0_.uuid=persistent0_62_.UUID(+)
and persistent0_.uuid=persistent0_63_.UUID(+)
and persistent0_.uuid=persistent0_64_.UUID(+)
and persistent0_.uuid=persistent0_65_.UUID(+)
and persistent0_.uuid=persistent0_66_.UUID(+)
and persistent0_.uuid=persistent0_67_.UUID(+)
and persistent0_.uuid=persistent0_68_.UUID(+)
and persistent0_.uuid=persistent0_69_.UUID(+)
and persistent0_.uuid=persistent0_70_.UUID(+)
and persistent0_.uuid=persistent0_71_.UUID(+)
and persistent0_.uuid=persistent0_72_.UUID(+)
and persistent0_.uuid=persistent0_73_.UUID(+)
and persistent0_.uuid=:1

dieses ist das gesammte durch cascings "markierte" Projekt. Dieses SQL wird scheinbar bei jedem "Insert" (Also wäherend eines Imports einige 10000 mal) ausgeführt und frisst entsprechend den grossteilteil der laufzeit. Kann man was gegen dieses verhalten von Hibernate tun?


Weiss jemand warum ein solche query entseht und wie man "das" abschalten kann?


vielen Dank in voraus ...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 08, 2008 5:31 am 
Newbie

Joined: Thu Feb 07, 2008 12:38 pm
Posts: 4
Location: Franconia/Germany
Hallo nightowl,

bei Operationen mit so großer Last für die Anwendungsschicht (Bulk-Operations) ist es ratsam, das
Ganze per Hand zu optimieren.

a) Kapsel doch diese Operation als einen Businessvorgang und formuliere
ein oder mehrere optimierte Statements direkt in JDBC. Diese Operation
kannst Du ja bequem in Deine Hibernate-Umgebung einpassen und gezielt
aufrufen (Transaktionskonzept und korrektes commit sowie Session-Cache beachten!).

b) Alternativ wäre eine StoredProcedure sinnvoll, um die Last direkt in der
Datenbank zu belassen.

_________________
Micha
Member of a friendly software team


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 09, 2008 8:17 am 
Expert
Expert

Joined: Thu Jul 05, 2007 9:38 am
Posts: 287
Michas Empfehlungen sind gut, aber falls du doch der Ursache auf den Grund gehen willst, habe ich zumindest die eine oder andere Idee:

1. Die vielen Joins sind zu allem überfluss auch noch outer joins. Dies deutet auf nullable referenzen hin. Wenn möglich sollten die not nullable gemacht werden.

2. Leider hast du nicht wirklich geschrieben, was du da eigentlich tust. ein kurzes java snippet mit einer Kennzeichnung wo dieses Statements generiert werden währe hilfreich.

3. Was nun wirklich geschieht könnte folgendes sein: Um deinen Objektgraphen zu kopieren (was immer das genau meint), Müssen die Objekte geladen werden. Ich vermute das dies für jedes einzelne Objekt in deinem Graphe (oder zumindest sehr viele) geschieht. Was dann zu den besagten Statements führt. Wenn dies der Fall ist, solltest du die Tuningempfehlungen aus der Referenz bzw. den Standardwerken noch mal durchgehen.

Bei dem von dir beschriebenen Scenario könnte ich mir vorstellen, dass ein eager Loading des gesamten Graphen, z.B. per handgeschriebenem HQL Statement sowohl vom Programmieraufwand als auch vom Resultat recht befriedigend sein sollte.

Jens

_________________
Please rate useful posts.


Schauderhaft: Softwaredevelopment, Projectmanagement, Qualitymanagement and all things "schauderhaft"


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.