<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ### 3.6.7 兩個鍵上搜索 在一個鍵上使用 [`OR`](https://dev.mysql.com/doc/refman/8.0/en/logical-operators.html#operator_or) 非常好優化, 就像是處理 [`AND`](https://dev.mysql.com/doc/refman/8.0/en/logical-operators.html#operator_and) 一樣. 一個棘手的情況是在兩個不同的鍵上使用 [`OR`](https://dev.mysql.com/doc/refman/8.0/en/logical-operators.html#operator_or): ```sql SELECT field1_index, field2_index FROM test_table WHERE field1_index = '1' OR field2_index = '1' ``` 這種情況優化過. 參閱 [Section 8.2.1.3, “索引合并優化”](https://dev.mysql.com/doc/refman/8.0/en/index-merge-optimization.html). 你還可以使用 [`UNION`](https://dev.mysql.com/doc/refman/8.0/en/union.html) 組合兩個單獨的 [`SELECT`](https://dev.mysql.com/doc/refman/8.0/en/select.html) 語句的輸出解決這個問題. 參閱 [Section 13.2.10.3, “UNION 語法”](https://dev.mysql.com/doc/refman/8.0/en/union.html). 每個 [`SELECT`](https://dev.mysql.com/doc/refman/8.0/en/select.html) 只搜索一個鍵, 可以優化: ```sql SELECT field1_index, field2_index FROM test_table WHERE field1_index = '1' UNION SELECT field1_index, field2_index FROM test_table WHERE field2_index = '1'; ```
                  <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>

                              哎呀哎呀视频在线观看