-->
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.  [ 4 posts ] 
Author Message
 Post subject: modifications to generated SQL for optimization?
PostPosted: Sun Jul 08, 2007 6:48 pm 
Newbie

Joined: Tue Sep 19, 2006 6:47 am
Posts: 15
Hi, I have a MySQL sepcific question: I would like to use an optimized query using "SELECT STRAIGHT_JOIN ...", i.e. I would like to do some modification to the generated SQL. Any possibility using this in combination with Hibernate without writing plain SQL? This is a really big performance issue in our project so it would be incredibly useful.

Thanks for any suggestions.

Christopher


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 4:57 am 
Newbie

Joined: Tue Sep 19, 2006 6:47 am
Posts: 15
any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 5:49 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

Send more details

Amila


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 6:10 am 
Newbie

Joined: Tue Sep 19, 2006 6:47 am
Posts: 15
Well... I figured out that we have some problems concerning performance when using "ORDER BY" in complex select statements. I found a way to optimize the performance by playing around with the query that was generated by Hibernate and by reading the MySQL documentation. Unfortunately I need to modify the select statment by changing it from "select table_.property1, ... ORDER BY table_1.property1" to "select STRAIGHT_JOIN table_.property1, ... ORDER BY table_1.property1". I haven't found a way of modifying the statement before it gets executed or of configuring Hibernate. I guess optimizing your SQL statements is a common task and I would like to know if there is a way of direct support by Hibernate.

I hope this clarifies my problem.

Thanks,

Christopher


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