-->
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.  [ 2 posts ] 
Author Message
 Post subject: querying entyties with lob properties is very slow
PostPosted: Fri Feb 16, 2007 1:38 pm 
Newbie

Joined: Fri Feb 16, 2007 6:52 am
Posts: 5
I have a problem querying an entity with a lob property, thats my entity's definition :



Code:
@Entity
public class File{
@Id @GeneratedValue(strategy=GenerationType.AUTO)
long    code      ;
@ManyToOne
Person    person       = null;
Date    timestamp    = Calendar.getInstance().getTime();
String   fileName    = "";
@OneToOne
User    creator      = null;
@OneToOne
User    lastUpdater   = null;
String    description = "";
@Lob @Basic(fetch = FetchType.LAZY)
Blob    contents    = null;

...geters/setters
}





and that's the way a query the objects :


Code:
List<File> results =entityManager.createQuery(" from File f").getResultList();   




entityManager is injected from the seam's context.
I'm using mysql with mysql inno dialect, the query is very very slow and very memory consuming cause hibernate includes the lob field into the sql.

What am i not doing in the right way?

thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 7:22 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You'll have to move out of MySQL, this is one of their limitations

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.