• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

Optimizer hints

Need a quick answer.

How do you use optimizer hints with the following query

FROM myTable MT
INNER JOIN MyOtherTable MOT ON MT.Col1 = MOT.Col1 AND MT.Col2 = MOT.Col2

I want to force use of MyIndex
1 Solution
For version 7.0:

USE pubs
SELECT t1.au_lname
FROM authors t1 (index=aunmind) INNER JOIN titleauthor t2 (index=titleidind)
    ON t1.au_id = t2.au_id

It will force to use aunmind index on table authors and titleidind index
on table titleauthor.
simonsabinAuthor Commented:
already got the answer but you can have the points anyway.

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now