INFINITE loop with HQL Query using select new SomeClass(queryclass)

Description

Hi,

Run into an infinite loop problem when using HQL "select new" Query best if I report this in code: (also attaching relevant java classes,
file being described is: AdMgmtInfo.java)

I have following HQL query string:

String queryString = "select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw"

upon executing

Query query = entityManager.createQuery(queryString);
List<IAdMgmtInfo> adMgmtInfoList = (List<IAdMgmtInfo>) query.getResultList();

Hibernate goes into INFINITE loop creating follwoing repeating output (jboss log)

2006-11-05 19:08:26,316 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw
2006-11-05 19:08:26,347 DEBUG [org.hibernate.hql.ast.AST] — HQL AST —
-[QUERY] 'query'
-[SELECT_FROM] 'SELECT_FROM'
+-[FROM] 'from'

-[RANGE] 'RANGE'

+-[DOT] '.'

 

+-[DOT] '.'

 

 

+-[DOT] '.'

 

 

 

+-[DOT] '.'

 

 

 

 

+-[IDENT] 'com'

 

 

 

 

-[IDENT] 'unicast'

 

 

 

-[IDENT] 'campaign'

 

 

-[IDENT] 'impl'

 

-[IDENT] 'AdMgmtVw'

-[ALIAS] 'admgmtvw'
-[SELECT] 'select'
-[CONSTRUCTOR] '('
+-[DOT] '.'

+-[DOT] '.'

 

+-[DOT] '.'

 

 

+-[DOT] '.'

 

 

 

+-[IDENT] 'com'

 

 

 

-[IDENT] 'unicast'

 

 

-[IDENT] 'campaign'

 

-[IDENT] 'impl'

-[IDENT] 'AdMgmtInfo'
-[IDENT] 'admgmtvw'

2006-11-05 19:08:26,347 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-11-05 19:08:26,488 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select << begin [level=1, statement=select]
2006-11-05 19:08:26,550 DEBUG [org.hibernate.hql.ast.tree.FromElement] FromClause{level=1} : com.unicast.campaign.impl.AdMgmtVw (admgmtvw) -> admgmtvw0_
2006-11-05 19:08:26,566 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] Resolved : admgmtvw -> admgmtvw0_.AD_ID
2006-11-05 19:08:26,581 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select : finishing up [level=1, statement=select]
2006-11-05 19:08:26,581 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] processQuery() : ( SELECT ( {select clause} ( ( ( . ( . ( . ( . com unicast ) campaign ) impl ) AdMgmtInfo ) admgmtvw0_.AD_ID ) ) ( FromClause{level=1} FUSE_RP.AD_MGMT_VW admgmtvw0_ ) )
2006-11-05 19:08:26,597 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] Using FROM fragment [FUSE_RP.AD_MGMT_VW admgmtvw0_]
2006-11-05 19:08:26,597 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] select >> end [level=1, statement=select]
2006-11-05 19:08:26,613 DEBUG [org.hibernate.hql.ast.AST] — SQL AST —
-[SELECT] QueryNode: 'SELECT' querySpaces (FUSE_RP.AD_MGMT_VW)
+-[SELECT_CLAUSE] SelectClause: '{select clause}'

-[CONSTRUCTOR] ConstructorNode: '('

+-[DOT] DotNode: '.' {propertyName=null,dereferenceType=ROOT_LEVEL,propertyPath=null,path=com.unicast.campaign.impl.AdMgmtInfo,no from element}

 

+-[DOT] DotNode: '.' {propertyName=null,dereferenceType=ROOT_LEVEL,propertyPath=null,path=com.unicast.campaign.impl,no from element}

 

 

+-[DOT] DotNode: '.' {propertyName=null,dereferenceType=ROOT_LEVEL,propertyPath=null,path=com.unicast.campaign,no from element}

 

 

 

+-[DOT] DotNode: '.' {propertyName=null,dereferenceType=ROOT_LEVEL,propertyPath=null,path=com.unicast,no from element}

 

 

 

 

+-[IDENT] IdentNode: 'com' {originalText=com}

 

 

 

 

-[IDENT] IdentNode: 'unicast' {originalText=unicast}

 

 

 

-[IDENT] IdentNode: 'campaign' {originalText=campaign}

 

 

-[IDENT] IdentNode: 'impl' {originalText=impl}

 

-[IDENT] IdentNode: 'AdMgmtInfo' {originalText=AdMgmtInfo}

-[ALIAS_REF] IdentNode: 'admgmtvw0_.AD_ID as col_0_0_' {alias=admgmtvw, className=com.unicast.campaign.impl.AdMgmtVw, tableAlias=admgmtvw0_}
-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[admgmtvw], fromElementByTableAlias=[admgmtvw0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
-[FROM_FRAGMENT] FromElement: 'FUSE_RP.AD_MGMT_VW admgmtvw0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=admgmtvw,role=null,tableName=FUSE_RP.AD_MGMT_VW,tableAlias=admgmtvw0_,origin=null,colums={,className=com.unicast.campaign.impl.AdMgmtVw}}

2006-11-05 19:08:26,613 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-11-05 19:08:26,644 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw
2006-11-05 19:08:26,644 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_
2006-11-05 19:08:26,644 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-11-05 19:08:26,691 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-11-05 19:08:26,691 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2006-11-05 19:08:26,738 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_
2006-11-05 19:08:26,738 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_
2006-11-05 19:08:27,003 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2006-11-05 19:08:27,003 DEBUG [org.hibernate.loader.Loader] result row:
2006-11-05 19:08:27,081 DEBUG [org.hibernate.loader.Loader] loading entity: [com.unicast.campaign.impl.AdMgmtVw#210]
2006-11-05 19:08:27,081 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-11-05 19:08:27,081 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,081 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,222 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 1, globally: 1)
2006-11-05 19:08:27,222 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.unicast.campaign.impl.AdMgmtVw#210]
2006-11-05 19:08:27,284 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 2, globally: 2)
2006-11-05 19:08:27,284 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 2, globally: 2)
2006-11-05 19:08:27,316 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggresive-release due to open resources on batcher
2006-11-05 19:08:27,316 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.unicast.campaign.impl.AdMgmtVw#210]
2006-11-05 19:08:27,331 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.unicast.campaign.impl.AdMgmtVw#210]
2006-11-05 19:08:27,331 DEBUG [org.hibernate.loader.Loader] done entity load
2006-11-05 19:08:27,331 DEBUG [org.hibernate.loader.Loader] result row:
2006-11-05 19:08:27,331 DEBUG [org.hibernate.loader.Loader] loading entity: [com.unicast.campaign.impl.AdMgmtVw#208]
2006-11-05 19:08:27,331 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-11-05 19:08:27,331 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,331 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,472 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 1, globally: 1)
2006-11-05 19:08:27,472 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.unicast.campaign.impl.AdMgmtVw#208]
2006-11-05 19:08:27,503 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 2, globally: 2)
2006-11-05 19:08:27,503 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 2, globally: 2)
2006-11-05 19:08:27,534 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggresive-release due to open resources on batcher
2006-11-05 19:08:27,534 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.unicast.campaign.impl.AdMgmtVw#208]
2006-11-05 19:08:27,534 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.unicast.campaign.impl.AdMgmtVw#208]
2006-11-05 19:08:27,534 DEBUG [org.hibernate.loader.Loader] done entity load
2006-11-05 19:08:27,534 DEBUG [org.hibernate.loader.Loader] result row:
2006-11-05 19:08:27,534 DEBUG [org.hibernate.loader.Loader] loading entity: [com.unicast.campaign.impl.AdMgmtVw#1011]
2006-11-05 19:08:27,534 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-11-05 19:08:27,534 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,534 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?
2006-11-05 19:08:27,675 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 1, globally: 1)
2006-11-05 19:08:27,675 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[com.unicast.campaign.impl.AdMgmtVw#1011]
2006-11-05 19:08:27,706 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 2, globally: 2)
2006-11-05 19:08:27,706 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 2, globally: 2)
2006-11-05 19:08:27,738 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggresive-release due to open resources on batcher
2006-11-05 19:08:27,738 DEBUG [org.hibernate.engine.TwoPhaseLoad] resolving associations for [com.unicast.campaign.impl.AdMgmtVw#1011]
2006-11-05 19:08:27,738 DEBUG [org.hibernate.engine.TwoPhaseLoad] done materializing entity [com.unicast.campaign.impl.AdMgmtVw#1011]
2006-11-05 19:08:27,738 DEBUG [org.hibernate.loader.Loader] done entity load
2006-11-05 19:08:27,738 DEBUG [org.hibernate.loader.Loader] result row:

---------------------------------------------------------------------------------------------------------

Environment

Win XP, Hibernate version 3.2 cr4, August 24, 2006 Jboss jboss-4.0.4.GA, Oracle 10G

Activity

Show:
andrew
November 6, 2006, 2:39 PM

hmmm

when I use

HQL 2006-11-05 19:08:26,316 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw

Hibernate translates to native SQL:

andrew
November 6, 2006, 2:44 PM

sorry comment was cut:

Hibernate translates to native SQL: (and yes long list of objects is loaded) that was bad example ..

2006-11-05 19:08:27,081 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?

------------------------
I ment to actually show that running:

DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw.adId, admgmtvw.creativeId, admgmtvw.creativeName, admgmtvw.placementId, admgmtvw.placementName, admgmtvw.campaignId, admgmtvw.campaignName, admgmtvw.campaignStartDate, admgmtvw.campaignEndDate, admgmtvw.campaignPo, admgmtvw.publisherId, admgmtvw.publisherName, admgmtvw.advertiserId, admgmtvw.advertiserName, admgmtvw.agencyId, admgmtvw.agencyName, admgmtvw.billablePartyBusType, admgmtvw.vwptSalesManager, admgmtvw.vwptSalesLocation, admgmtvw.vwptCsrId, admgmtvw.vwptCsrName, admgmtvw.placementCap, admgmtvw.placementStartDate, admgmtvw.placementEndDate, admgmtvw.creativeProductGroup, admgmtvw.creativeFormat, admgmtvw.creativeTechnologyType, admgmtvw.creativeFileSize, admgmtvw.creativeCpm, admgmtvw.billablePartyContactName, admgmtvw.billablePartyAddress, admgmtvw.billablePartyPhone, admgmtvw.billablePartyFax, admgmtvw.billablePartyEmail, admgmtvw.adPlannedImps, admgmtvw.impressionToCount, admgmtvw.creativeFullPlayLength, admgmtvw.billingName, admgmtvw.videoPlayTime) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw, com.unicast.campaign.impl.StatusReference as statusreference, com.unicast.campaign.impl.Status as status, com.unicast.campaign.impl.AdsPlacement as adsplacement where 1=1 and admgmtvw.placementId = adsplacement.placementId and adsplacement.statusReference.statusReferenceId = statusreference.statusReferenceId and statusreference.status.statusId = status.statusId and admgmtvw.placementEndDate >= '07-Jul-2006' and admgmtvw.placementStartDate <= '31-Oct-2006' order by lower(admgmtvw.campaignName), lower(admgmtvw.publisherName), lower(admgmtvw.placementName)

was translated to:

select admgmtvw0_.AD_ID as col_0_0_, admgmtvw0_.CREATIVE_ID as col_1_0_, admgmtvw0_.CREATIVE_NAME as col_2_0_, admgmtvw0_.PLACEMENT_ID as col_3_0_, admgmtvw0_.PLACEMENT_NAME as col_4_0_, admgmtvw0_.CAMPAIGN_ID as col_5_0_, admgmtvw0_.CAMPAIGN_NAME as col_6_0_, admgmtvw0_.CAMPAIGN_START_DATE as col_7_0_, admgmtvw0_.CAMPAIGN_END_DATE as col_8_0_, admgmtvw0_.CAMPAIGN_PO as col_9_0_, admgmtvw0_.PUBLISHER_ID as col_10_0_, admgmtvw0_.PUBLISHER_NAME as col_11_0_, admgmtvw0_.ADVERTISER_ID as col_12_0_, admgmtvw0_.ADVERTISER_NAME as col_13_0_, admgmtvw0_.AGENCY_ID as col_14_0_, admgmtvw0_.AGENCY_NAME as col_15_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as col_16_0_, admgmtvw0_.VWPT_SALES_MANAGER as col_17_0_, admgmtvw0_.VWPT_SALES_LOCATION as col_18_0_, admgmtvw0_.VWPT_CSR_ID as col_19_0_, admgmtvw0_.VWPT_CSR_NAME as col_20_0_, admgmtvw0_.PLACEMENT_CAP as col_21_0_, admgmtvw0_.PLACEMENT_START_DATE as col_22_0_, admgmtvw0_.PLACEMENT_END_DATE as col_23_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as col_24_0_, admgmtvw0_.CREATIVE_FORMAT as col_25_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as col_26_0_, admgmtvw0_.CREATIVE_FILE_SIZE as col_27_0_, admgmtvw0_.CREATIVE_CPM as col_28_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as col_29_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as col_30_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as col_31_0_, admgmtvw0_.BILLABLE_PARTY_FAX as col_32_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as col_33_0_, admgmtvw0_.AD_PLANNED_IMPS as col_34_0_, admgmtvw0_.IMPRESSION_TO_COUNT as col_35_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as col_36_0_, admgmtvw0_.BILLING_NAME as col_37_0_, admgmtvw0_.VIDEO_PLAY_TIME as col_38_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_, FUSE_UI.STATUS_REFERENCE statusrefe1_, FUSE_UI.STATUS status2_, FUSE_UI.ADS_PLACEMENT adsplaceme3_ where 1=1 and admgmtvw0_.PLACEMENT_ID=adsplaceme3_.PLACEMENT_ID and adsplaceme3_.STATUS_REFERENCE_ID=statusrefe1_.STATUS_REFERENCE_ID and statusrefe1_.STATUS_ID=status2_.STATUS_ID and admgmtvw0_.PLACEMENT_END_DATE>='07-Jul-2006' and admgmtvw0_.PLACEMENT_START_DATE<='31-Oct-2006' order by lower(admgmtvw0_.CAMPAIGN_NAME), lower(admgmtvw0_.PUBLISHER_NAME), lower(admgmtvw0_.PLACEMENT_NAME)

Max Rydahl Andersen
November 6, 2006, 2:49 PM

since i still can't see what error you are referring to i've downgraded this and unless you show an actual error then i'll reject the bug.

andrew
November 6, 2006, 2:50 PM

however this query

2006-11-06 07:46:58,874 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] parse() - HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw, com.unicast.campaign.impl.StatusReference as statusreference, com.unicast.campaign.impl.Status as status, com.unicast.campaign.impl.AdsPlacement as adsplacement where 1=1 and admgmtvw.placementId = adsplacement.placementId and adsplacement.statusReference.statusReferenceId = statusreference.statusReferenceId and statusreference.status.statusId = status.statusId and admgmtvw.placementEndDate >= '07-Jul-2006' and admgmtvw.placementStartDate <= '31-Oct-2006' order by lower(admgmtvw.campaignName), lower(admgmtvw.publisherName), lower(admgmtvw.placementName)

translated to and yes LAZY loading of each an every row from admgmtvw is queried!

2006-11-06 07:46:59,295 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw, com.unicast.campaign.impl.StatusReference as statusreference, com.unicast.campaign.impl.Status as status, com.unicast.campaign.impl.AdsPlacement as adsplacement where 1=1 and admgmtvw.placementId = adsplacement.placementId and adsplacement.statusReference.statusReferenceId = statusreference.statusReferenceId and statusreference.status.statusId = status.statusId and admgmtvw.placementEndDate >= '07-Jul-2006' and admgmtvw.placementStartDate <= '31-Oct-2006' order by lower(admgmtvw.campaignName), lower(admgmtvw.publisherName), lower(admgmtvw.placementName)
2006-11-06 07:46:59,295 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_, FUSE_UI.STATUS_REFERENCE statusrefe1_, FUSE_UI.STATUS status2_, FUSE_UI.ADS_PLACEMENT adsplaceme3_ where 1=1 and admgmtvw0_.PLACEMENT_ID=adsplaceme3_.PLACEMENT_ID and adsplaceme3_.STATUS_REFERENCE_ID=statusrefe1_.STATUS_REFERENCE_ID and statusrefe1_.STATUS_ID=status2_.STATUS_ID and admgmtvw0_.PLACEMENT_END_DATE>='07-Jul-2006' and admgmtvw0_.PLACEMENT_START_DATE<='31-Oct-2006' order by lower(admgmtvw0_.CAMPAIGN_NAME), lower(admgmtvw0_.PUBLISHER_NAME), lower(admgmtvw0_.PLACEMENT_NAME)
2006-11-06 07:46:59,295 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2006-11-06 07:46:59,358 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-11-06 07:46:59,358 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2006-11-06 07:46:59,405 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_, FUSE_UI.STATUS_REFERENCE statusrefe1_, FUSE_UI.STATUS status2_, FUSE_UI.ADS_PLACEMENT adsplaceme3_ where 1=1 and admgmtvw0_.PLACEMENT_ID=adsplaceme3_.PLACEMENT_ID and adsplaceme3_.STATUS_REFERENCE_ID=statusrefe1_.STATUS_REFERENCE_ID and statusrefe1_.STATUS_ID=status2_.STATUS_ID and admgmtvw0_.PLACEMENT_END_DATE>='07-Jul-2006' and admgmtvw0_.PLACEMENT_START_DATE<='31-Oct-2006' order by lower(admgmtvw0_.CAMPAIGN_NAME), lower(admgmtvw0_.PUBLISHER_NAME), lower(admgmtvw0_.PLACEMENT_NAME)
2006-11-06 07:46:59,405 INFO [STDOUT] Hibernate: select admgmtvw0_.AD_ID as col_0_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_, FUSE_UI.STATUS_REFERENCE statusrefe1_, FUSE_UI.STATUS status2_, FUSE_UI.ADS_PLACEMENT adsplaceme3_ where 1=1 and admgmtvw0_.PLACEMENT_ID=adsplaceme3_.PLACEMENT_ID and adsplaceme3_.STATUS_REFERENCE_ID=statusrefe1_.STATUS_REFERENCE_ID and statusrefe1_.STATUS_ID=status2_.STATUS_ID and admgmtvw0_.PLACEMENT_END_DATE>='07-Jul-2006' and admgmtvw0_.PLACEMENT_START_DATE<='31-Oct-2006' order by lower(admgmtvw0_.CAMPAIGN_NAME), lower(admgmtvw0_.PUBLISHER_NAME), lower(admgmtvw0_.PLACEMENT_NAME)
2006-11-06 07:46:59,717 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2006-11-06 07:46:59,733 DEBUG [org.hibernate.loader.Loader] result row:
2006-11-06 07:46:59,811 DEBUG [org.hibernate.loader.Loader] loading entity: [com.unicast.campaign.impl.AdMgmtVw#4920]
2006-11-06 07:46:59,811 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 1, globally: 1)

>> EVERY ROW FROM admgmtvw is queried

2006-11-06 07:46:59,811 DEBUG [org.hibernate.SQL] select admgmtvw0_.AD_ID as AD1_4_0_, admgmtvw0_.PLACEMENT_ID as PLACEMENT2_4_0_, admgmtvw0_.ADVERTISER_ID as ADVERTISER3_4_0_, admgmtvw0_.ADVERTISER_NAME as ADVERTISER4_4_0_, admgmtvw0_.AGENCY_ID as AGENCY5_4_0_, admgmtvw0_.AGENCY_NAME as AGENCY6_4_0_, admgmtvw0_.BILLING_NAME as BILLING7_4_0_, admgmtvw0_.CAMPAIGN_END_DATE as CAMPAIGN8_4_0_, admgmtvw0_.CAMPAIGN_ID as CAMPAIGN9_4_0_, admgmtvw0_.CAMPAIGN_NAME as CAMPAIGN10_4_0_, admgmtvw0_.CAMPAIGN_START_DATE as CAMPAIGN11_4_0_, admgmtvw0_.CREATIVE_FULL_PLAY_LENGTH as CREATIVE12_4_0_, admgmtvw0_.CREATIVE_ID as CREATIVE13_4_0_, admgmtvw0_.CREATIVE_NAME as CREATIVE14_4_0_, admgmtvw0_.PUBLISHER_NAME as PUBLISHER15_4_0_, admgmtvw0_.PLACEMENT_NAME as PLACEMENT16_4_0_, admgmtvw0_.CAMPAIGN_PO as CAMPAIGN17_4_0_, admgmtvw0_.PUBLISHER_ID as PUBLISHER18_4_0_, admgmtvw0_.BILLABLE_PARTY_BUS_TYPE as BILLABLE19_4_0_, admgmtvw0_.VWPT_SALES_MANAGER as VWPT20_4_0_, admgmtvw0_.VWPT_SALES_LOCATION as VWPT21_4_0_, admgmtvw0_.VWPT_CSR_ID as VWPT22_4_0_, admgmtvw0_.VWPT_CSR_NAME as VWPT23_4_0_, admgmtvw0_.PLACEMENT_CAP as PLACEMENT24_4_0_, admgmtvw0_.PLACEMENT_START_DATE as PLACEMENT25_4_0_, admgmtvw0_.PLACEMENT_END_DATE as PLACEMENT26_4_0_, admgmtvw0_.CREATIVE_PRODUCT_GROUP as CREATIVE27_4_0_, admgmtvw0_.CREATIVE_FORMAT as CREATIVE28_4_0_, admgmtvw0_.CREATIVE_TECHNOLOGY_TYPE as CREATIVE29_4_0_, admgmtvw0_.CREATIVE_FILE_SIZE as CREATIVE30_4_0_, admgmtvw0_.CREATIVE_CPM as CREATIVE31_4_0_, admgmtvw0_.BILLABLE_PARTY_CONTACT_NAME as BILLABLE32_4_0_, admgmtvw0_.BILLABLE_PARTY_ADDRESS as BILLABLE33_4_0_, admgmtvw0_.BILLABLE_PARTY_PHONE as BILLABLE34_4_0_, admgmtvw0_.BILLABLE_PARTY_FAX as BILLABLE35_4_0_, admgmtvw0_.BILLABLE_PARTY_EMAIL as BILLABLE36_4_0_, admgmtvw0_.AD_PLANNED_IMPS as AD37_4_0_, admgmtvw0_.IMPRESSION_TO_COUNT as IMPRESSION38_4_0_, admgmtvw0_.VIDEO_PLAY_TIME as VIDEO39_4_0_ from FUSE_RP.AD_MGMT_VW admgmtvw0_ where admgmtvw0_.AD_ID=?

andrew
November 6, 2006, 3:01 PM

Essentially I see performance problem one query loads every row from entity admgmtvw: (notice this is exact query!)

FAST QUERY:

select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw, com.unicast.campaign.impl.StatusReference as statusreference, com.unicast.campaign.impl.Status as status, com.unicast.campaign.impl.AdsPlacement as adsplacement where 1=1 and admgmtvw.placementId = adsplacement.placementId and adsplacement.statusReference.statusReferenceId = statusreference.statusReferenceId and statusreference.status.statusId = status.statusId and admgmtvw.placementEndDate >= '07-Jul-2006' and admgmtvw.placementStartDate <= '31-Oct-2006' order by lower(admgmtvw.campaignName), lower(admgmtvw.publisherName), lower(admgmtvw.placementName)

SLOW QUERY:

HQL: select new com.unicast.campaign.impl.AdMgmtInfo(admgmtvw.adId, admgmtvw.creativeId, admgmtvw.creativeName, admgmtvw.placementId, admgmtvw.placementName, admgmtvw.campaignId, admgmtvw.campaignName, admgmtvw.campaignStartDate, admgmtvw.campaignEndDate, admgmtvw.campaignPo, admgmtvw.publisherId, admgmtvw.publisherName, admgmtvw.advertiserId, admgmtvw.advertiserName, admgmtvw.agencyId, admgmtvw.agencyName, admgmtvw.billablePartyBusType, admgmtvw.vwptSalesManager, admgmtvw.vwptSalesLocation, admgmtvw.vwptCsrId, admgmtvw.vwptCsrName, admgmtvw.placementCap, admgmtvw.placementStartDate, admgmtvw.placementEndDate, admgmtvw.creativeProductGroup, admgmtvw.creativeFormat, admgmtvw.creativeTechnologyType, admgmtvw.creativeFileSize, admgmtvw.creativeCpm, admgmtvw.billablePartyContactName, admgmtvw.billablePartyAddress, admgmtvw.billablePartyPhone, admgmtvw.billablePartyFax, admgmtvw.billablePartyEmail, admgmtvw.adPlannedImps, admgmtvw.impressionToCount, admgmtvw.creativeFullPlayLength, admgmtvw.billingName, admgmtvw.videoPlayTime) from com.unicast.campaign.impl.AdMgmtVw as admgmtvw, com.unicast.campaign.impl.StatusReference as statusreference, com.unicast.campaign.impl.Status as status, com.unicast.campaign.impl.AdsPlacement as adsplacement where 1=1 and admgmtvw.placementId = adsplacement.placementId and adsplacement.statusReference.statusReferenceId = statusreference.statusReferenceId and statusreference.status.statusId = status.statusId and admgmtvw.placementEndDate >= '07-Jul-2006' and admgmtvw.placementStartDate <= '31-Oct-2006' order by lower(admgmtvw.campaignName), lower(admgmtvw.publisherName), lower(admgmtvw.placementName)

Assignee

Unassigned

Reporter

andrew

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure