Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Force index in MySQL 5.1
Force index in MySQL 5.1 [message #874731] Mon, 21 May 2012 13:00 Go to next message
Zafiris P is currently offline Zafiris PFriend
Messages: 1
Registered: May 2012
Junior Member
Hi all,

I am using MySQL 5.1 and EclipseLink v2.2. I was wondering if and how I can force a generated query to use a specific index.

e.g. how can the EclipseLink query

SELECT p FROM TableX WHERE col='value';


be executed as

Select p.col,p.col2 FROM TableX FORCE INDEX (mysuperindex) WHERE col='value'


Thanks in advance

Re: Force index in MySQL 5.1 [message #875902 is a reply to message #874731] Wed, 23 May 2012 14:13 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

You need to use a native SQL query.

James : Wiki : Book : Blog : Twitter
Previous Topic:Restore from history
Next Topic:Duplicate column with TABLE_PER_CLASS and @OrderColumn,, bug or incorrect mapping?
Goto Forum:
  


Current Time: Fri Nov 28 09:05:56 GMT 2014

Powered by FUDForum. Page generated in 0.09287 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software