<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                執行計劃,簡單的來說,是SQL在數據庫中執行時的表現情況,通常用于SQL性能分析,優化等場景。 在MySQL使用 explain 關鍵字來查看SQL的執行計劃。如下所示: ~~~ //1. 查詢cmf_users select * from cmf_users where name="tsingxu"; //2. 查看上述語句的執行計劃 explain select * from cmf_users where name="tsingxu"; ~~~ ![](https://box.kancloud.cn/918fdd0212c326fb7462ddeedb134ef4_640x41.jpg) * id 表示查詢中select操作表的順序,按順序從大到小依次執行 * select_type 該表示選擇的類型,可選值有: SIMPLE(簡單的), * table 表示該語句查詢的表 * type 該屬性表示訪問類型 最常見包括以下幾種: ALL(全表掃描) index(索引掃描) range(范圍掃描) ref (非唯一索引掃描) eq_ref(唯一索引掃描) const(常數引用) 訪問速度依次由慢到快。其中 : range(范圍)常見與 between and …這種情況 提示 : 慢SQL是否走索引,走了什么索引,也就可以通過該屬性查看了 * possible_keys 該查詢語句,可能走的索引,(如某些字段上索引的名字) 這里提供的只是參考,而不是實際走的索引,也就導致會有possible_Keys不為null,key為空的現象 * key 顯示MySQL實際使用的索引,其中就包括主鍵索引(PRIMARY),或者自建索引的名字 * key_len 表示索引所使用的字節數 * ref 連接匹配條件,如果走主鍵索引的話,該值為: const, 全表掃描的話,為null值 * rows 掃描行數,也就是說,需要掃描多少行,采能獲取目標行數,一般情況下會大于返回行數。 通常情況下,rows越小,效率越高, 也就有大部分SQL優化,都是在減少這個值的大小。 注意: 理想情況下掃描的行數與實際返回行數理論上是一致的,但這種情況及其少,如關聯查詢,掃描的行數就會比返回行數大大增加) * extra 這個屬性非常重要,該屬性中包括執行SQL時的真實情況信息 常用的有: "using temporary" : 使用臨時表 "using filesort" : 使用文件排序 "using where" : 使用where篩選得到的值
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看