-->
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: Hinting which MySQL index to use on a select
PostPosted: Wed Dec 30, 2009 3:41 am 
Regular
Regular

Joined: Mon Mar 10, 2008 6:40 pm
Posts: 114
I have a table with a Deleted column and a multi-field index. Unfortunately the index on the Deleted column is used instead of the multi-field index which results in unacceptable performance. Since I'm using the 'like' operator on one of the muti-field index columns in the where clause, it doesn't seem to matter how I rearrange the query. I need to use the 'use index' command in the query.

Does Hibernate support this? Is there a way to hint to the underlying database's optimizer which index to use?

Is there a workaround if not?


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.