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 09:00 Go to next message
Zafiris P is currently offline Zafiris P
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 10:13 Go to previous message
James Sutherland is currently offline James Sutherland
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: Thu Jul 24 19:04:30 EDT 2014

Powered by FUDForum. Page generated in 0.07013 seconds