<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                #### list分區 list :條件值為一個數據列表。 算法 : ~~~ 根據"字段的內容值"是否在某個"列表"中進行分區,通過預定義的列表的值來對數據進行分割。 ~~~ 例: 假如你創建一個如下的一個表,該表保存有全國20家分公司的職員記錄,這20家分公司的編號從1到20.而這20家分公司分布在全國4個區域,如下表所示: 職員表 : ~~~ +----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+---------+-------+ | id | int(11) | YES | | NULL | | | name | varchar(32) | YES | | NULL | | | store_id | int(11) | YES | | NULL | | +----------+-------------+------+-----+---------+-------+ ~~~ 分區信息 ~~~ 北部 1,4,5,6,17,18 南部 2,7,9,10,11,13 東部 3,12,19,20 西部 8,14,15,16 ~~~ 建表語法 : ~~~ create table p_list( id int, name varchar(32), store_id int )engine innodb charset utf8 partition by list (store_id)( //分區字段 store_id partition p_north values in (1,4,5,6,17,18), partition p_east values in(2,7,9,10,11,13), partition p_south values in(3,12,19,20), partition p_west values in(8,14,15,16) ); ~~~ 分區文件信息 ![](https://box.kancloud.cn/b4b1fdacb32905f1b5d8076f33531240_878x280.png) #### 查詢測試 語法: ~~~ explain partitions select * from 表名 where 分區字段 = 條件\G ~~~ 結果: ~~~ id: 1 select_type: SIMPLE table: p_list partitions: p_east //使用到了分區 type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 1 filtered: 100.00 Extra: Using where ~~~ 不使用分區字段作為條件進行查詢 ~~~ explain partitions select * from 表名 where 其他字段 = 條件\G ~~~ 結果 ~~~ id: 1 select_type: SIMPLE table: p_list partitions: p_north,p_east,p_south,p_west //查找了所有分區 type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 3 filtered: 33.33 Extra: 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>

                              哎呀哎呀视频在线观看