-->
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.  [ 1 post ] 
Author Message
 Post subject: Performance on Entities with lots of columns...
PostPosted: Tue Jun 19, 2007 1:34 pm 
Newbie

Joined: Wed Jun 06, 2007 11:58 am
Posts: 13
I have this class Award mapping the Award table that has a lots of columns(30). When I do list awards I don't need more than few things (id, description) if I use a projection sql-query like below that will do it.

If I use hql that is way too slow because the extra work perform to fetch 30 columns per award.

Is lazy="true" on the field working ? Is there any other (better) way of doing ?


Code:
  <sql-query name="award.listing">
    <return alias="entry" class="Award"/>
    <![CDATA[
        SELECT
             cpa.award_id as {entry.id},
             cpa.description as {entry.description},
        FROM ,
             award cpa
       ]]>
  </sql-query>
[/code]


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

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.