lpflpf

搬砖程序员带你飞

砖搬得多了,就能盖楼

Mysql Hint 学习

Index Hint

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
tbl_name [[AS] alias] [index_hint_list]

index_hint_list:
    index_hint [index_hint] ...

    index_hint:
        USE {
            INDEX|KEY}
                  [FOR {
                      JOIN|ORDER BY|GROUP BY}] ([index_list])
      | IGNORE {
          INDEX|KEY}
                [FOR {
                    JOIN|ORDER BY|GROUP BY}] (index_list)
      | FORCE {
          INDEX|KEY}
                [FOR {
                    JOIN|ORDER BY|GROUP BY}] (index_list)

    index_list:
        index_name [, index_name] ...

在表明后 使用 (USE | IGNORE | FORCE ) (INDEX|KEY)`[FOR (JOIN | ORDER BY | GROUP BY)] index_name …

0%