<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          clickhouse如何刪除大表

          共 1549字,需瀏覽 4分鐘

           ·

          2022-06-14 18:22

          點(diǎn)擊上方藍(lán)字關(guān)注我

          clickhouse 在單表或單分區(qū)超過50GB時(shí),將無法直接刪除

          1. 案例

          模擬刪除單表或單分區(qū)超過50GB時(shí),刪除報(bào)錯(cuò)的情況

          1.1 一個(gè)表中超過50GB的分區(qū)

          -- 刪除分區(qū)的腳本如下ALTER TABLE testdb.test DROP PARTITION (20220606,'12');
          報(bào)錯(cuò)信息如下
          Code: 359. DB::Exception: Received from localhost:9000. DB::Exception: Table or Partition in testdb.test was not dropped.Reason:1. Size (56.20 GB) is greater than max_[table/partition]_size_to_drop (50.00 GB)2. File '/data/clickhouse/flags/force_drop_table' intended to force DROP doesn't existHow to fix this:1. Either increase (or set to zero) max_[table/partition]_size_to_drop in server config2. Either create forcing file /data/clickhouse/flags/force_drop_table and make sure that ClickHouse has write permission for it.Example:sudo touch '/data/clickhouse/flags/force_drop_table' && sudo chmod 666 '/data/clickhouse/flags/force_drop_table'.

          1.3 解決方法

          報(bào)錯(cuò)信息中已給出解決方法:

          1) 增大單表或單分區(qū)的可刪除的大小

          2) 通過執(zhí)行腳本,強(qiáng)制刪除

          1.4  我們選擇強(qiáng)制刪除來解決

          執(zhí)行如下腳本

          sudo touch '/data/clickhouse/flags/force_drop_table' && sudo chmod 666 '/data/clickhouse/flags/force_drop_table'
          執(zhí)行完畢以上腳本后即可刪除分區(qū)
          往期精彩回顧

          1.  MySQL高可用之MHA集群部署

          2.  mysql8.0新增用戶及加密規(guī)則修改的那些事

          3.  比hive快10倍的大數(shù)據(jù)查詢利器-- presto

          4.  監(jiān)控利器出鞘:Prometheus+Grafana監(jiān)控MySQL、Redis數(shù)據(jù)庫

          5.  PostgreSQL主從復(fù)制--物理復(fù)制

          6.  MySQL傳統(tǒng)點(diǎn)位復(fù)制在線轉(zhuǎn)為GTID模式復(fù)制

          7.  MySQL敏感數(shù)據(jù)加密及解密

          8.  MySQL數(shù)據(jù)備份及還原(一)

          9.  MySQL數(shù)據(jù)備份及還原(二)

          掃碼關(guān)注     


          瀏覽 63
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          評論
          圖片
          表情
          推薦
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  中国产一级黄色a片 | 国产草逼视频 | 国产 福利 视频 | 国产精品黄色电影 | 亚洲视频在线视频观看视频在线 |