Home avatar

搬砖程序员带你飞

砖搬得多了,就能盖楼

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 …

sequenceDiagram participant User as 用户 participant ClientAgent as 客户端智能体 participant AgentA as 智能体A (A系统) participant AuthA as A系统认证服务 participant AgentB as 智能体B (B系统) participant AuthB as B系统认证服务

User->>ClientAgent: 发起请求
ClientAgent->>AuthA: 获取A系统身份认证
AuthA-->>ClientAgent: 返回A系统令牌
ClientAgent->>AgentA: 请求服务 (带A系统令牌)

AgentA->>AgentA: 确定需要B系统资源
AgentA-->>ClientAgent: 返回INPUT-REQUIRED状态<br/>要求B系统身份认证

ClientAgent->>AuthB: 获取B系统身份认证
AuthB-->>ClientAgent: 返回B系统令牌
ClientAgent->>AgentA: 提供B系统令牌

AgentA->>AgentB: 请求服务 (传递B系统令牌)
AgentB->>AgentB: 验证B系统令牌
AgentB-->>AgentA: 返回结果
AgentA-->>ClientAgent: 返回最终结果
ClientAgent-->>User: 展示结果
0%