{
  "version": "https://jsonfeed.org/version/1", 
  "title": "ClickHouse", 
  "description": "", 
  "home_page_url": "https://www.v2ex.com/go/clickhouse", 
  "feed_url": "https://www.v2ex.com/feed/clickhouse.json", 
  "icon": "https://cdn.v2ex.com/navatar/a016/0709/1099_large.png?m=1628849112", 
  "favicon": "https://cdn.v2ex.com/navatar/a016/0709/1099_normal.png?m=1628849112", 
  "items": [
    {
      "author": {
        "url": "https://www.v2ex.com/member/red13", 
        "name": "red13", 
        "avatar": "https://cdn.v2ex.com/gravatar/935c3b660aacf5dfeed7a1f3822eb82b?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/1163573", 
      "date_modified": "2025-10-09T23:19:08+00:00", 
      "content_html": "<p>\u8981\u5bf9\u4e00\u4e2a\u5927\u6570\u636e\u91cf\u7684 table \u8fdb\u884c\u67e5\u8be2\uff0c\u4e0d\u4f1a\u6709\u590d\u6742\u7684\u67e5\u8be2\u903b\u8f91\uff0c\u90fd\u662f\u7b80\u5355\u7684 where \u3001order by \u3001group by \u3001sum \u3001avg \u3001count \u67e5\u8be2\uff0c\u5f53\u524d\u6570\u636e\u91cf\u63a5\u8fd1 500 \u4ebf\u4e86\uff0c\u5728\u534a\u5e74\u5185\u4f1a\u589e\u52a0\u5230\u4e00\u4e07\u4ebf\u3002</p>\n<p>\u76ee\u524d\u65b9\u6848\u662f\u4f7f\u7528 spark \uff0c\u6211\u77e5\u9053 clickhouse \u5f88\u9002\u5408 olap \u67e5\u8be2\u573a\u666f\u5e76\u4e14\u901f\u5ea6\u5f88\u5feb\uff0c\u4f46 clickhouse \u5bf9\u4e8e 10000 \u4ebf\u6570\u636e\u91cf\u80fd\u625b\u5f97\u4f4f\u5417\uff1f\u6216\u8005 clickhouse \u4e5f\u80fd\u5f88\u597d\u7684\u652f\u6301\u5206\u5e03\u5f0f\uff1f</p>\n<p>\u5bf9 clickhouse \u4e86\u89e3\u4e0d\u662f\u5f88\u6df1\u5165\uff0c\u5e0c\u671b\u5927\u4f6c\u6307\u70b9</p>\n", 
      "date_published": "2025-10-06T22:17:58+00:00", 
      "title": "\u6709\u6ca1\u6709\u719f\u6089 clickhouse \u7684\uff1f clickhouse \u5bf9\u4e8e\u5206\u5e03\u5f0f\u652f\u6301\u7684\u5982\u4f55\uff1f", 
      "id": "https://www.v2ex.com/t/1163573"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/user1284", 
        "name": "user1284", 
        "avatar": "https://cdn.v2ex.com/avatar/abf0/0140/661302_large.png?m=1758672931"
      }, 
      "url": "https://www.v2ex.com/t/1128690", 
      "title": "ClickHouse \u7684 MaterializedMySQL \u5f15\u64ce", 
      "id": "https://www.v2ex.com/t/1128690", 
      "date_published": "2025-04-28T09:17:10+00:00", 
      "content_html": "\u542c\u8bf4 ClickHouse \u7684 MaterializedMySQL \u5f15\u64ce\u662f\u4e00\u79cd\u4e13\u95e8\u4e3a MySQL \u6570\u636e\u540c\u6b65\u8bbe\u8ba1\u7684\u5185\u7f6e\u5f15\u64ce\uff0c\u9002\u7528\u4e8e MySQL 8.0 \u53ca\u4ee5\u4e0a\u7248\u672c\u3002\u5b83\u901a\u8fc7 MySQL \u7684 Binlog \u5b9e\u73b0\u589e\u91cf\u540c\u6b65\uff0c\u53ef\u4ee5\u5c06 MySQL \u4e2d\u7684\u6570\u636e\u5b9e\u65f6\u6216\u51c6\u5b9e\u65f6\u5730\u540c\u6b65\u5230 ClickHouse \u4e2d\u3002<br /><br />\u6709\u4eba\u5b9e\u9645\u7528\u8fc7\u5417, \u4f7f\u7528\u4f53\u9a8c\u600e\u4e48\u6837?<br /><br />\u600e\u4e48\u8fd9\u4e2a\u8282\u70b9\u5c31 8 \u4e2a\u4e3b\u9898, \u8fd9\u4e5f\u592a\u5c11\u4e86"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/aapeli", 
        "name": "aapeli", 
        "avatar": "https://cdn.v2ex.com/gravatar/e2651792ce479c7894b890d3770bcb83?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/1053202", 
      "title": "\u4e24\u6761\u6570\u636e\u5e93\u521b\u5efa\u8bed\u53e5\u4ea7\u751f\u4e86\u540c\u6837\u7684\u6548\u679c CREATE DATABASE hello1; \u4e0e CREATE DATABASE hello ON CLUSTER 'xxxxx';", 
      "id": "https://www.v2ex.com/t/1053202", 
      "date_published": "2024-06-27T13:20:07+00:00", 
      "content_html": "\u54a8\u8be2 clockhouse \u7684\u95ee\u9898\uff1a<br /><br />\u95ee\u9898: CREATE DATABASE hello1; \u4e0e CREATE DATABASE hello ON CLUSTER 'xxxxx'; \u4ea7\u751f\u4e86\u76f8\u540c\u7684\u6548\u679c\uff0c\u90fd\u5728 clickhouse \u6240\u6709\u8282\u70b9\u4e0a\u521b\u5efa\u4e86\u6570\u636e\u5e93,\u54a8\u8be2\u4e0b\u53ef\u80fd\u5b58\u5728\u7684\u539f\u56e0.<br /><br />\u671f\u671b\u7684\u6548\u679c: \u4e0d\u52a0 ON CLUSTER \u53ea\u5728\u672c\u5730\u521b\u5efa\uff0c\u52a0\u4e86\u5c31\u5728\u6574\u4e2a\u96c6\u7fa4\u6bcf\u4e2a\u8282\u70b9\u4e0a\u521b\u5efa."
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/xyxy", 
        "name": "xyxy", 
        "avatar": "https://cdn.v2ex.com/gravatar/05ad40b2413f57390eb169801d4dd19d?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/1026970", 
      "title": "\u5927\u4f6c\u4eec\uff0c\u6211\u53c8\u6765\u4e86\uff01\u7fa4\u6656\u88c5 clickhouse\uff0c\u6491\u5f97\u4f4f\u5417\uff1f", 
      "id": "https://www.v2ex.com/t/1026970", 
      "date_published": "2024-03-25T16:16:21+00:00", 
      "content_html": "\u60f3\u4e70\u53f0\u6b63\u7248\u7fa4\u6656\uff0c\u8dd1 clickhouse, 30 \u4ebf\u6761\u6570\u636e\uff0c\u5927\u6982 1TB \u7a7a\u95f4\u3002<br />\u8fd9\u53f0\u7fa4\u6656 cpu \u548c 6G \u5185\u5b58\uff0c\u6491\u5f97\u4f4f\u5417\uff1f<br />\u67e5\u8be2\u6b21\u6570\u5f88\u4f4e\uff0c\u67e5\u8be2\u6570\u636e\u91cf\u9884\u4f30\u4e00\u4e2a\u6708\u7684\uff0c300 \u4e07\u6761<br /><a target=\"_blank\" href=\"https://i.imgur.com/nwaMRth.jpeg\" rel=\"nofollow noopener\" target=\"_blank\"><img src=\"https://i.imgur.com/nwaMRth.jpeg\" class=\"embedded_image\" rel=\"noreferrer\"></a>"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/fruitmonster", 
        "name": "fruitmonster", 
        "avatar": "https://cdn.v2ex.com/gravatar/f425ed8fb4fd47b9c0ea6ab846b72db4?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/1017867", 
      "date_modified": "2024-02-24T10:23:55+00:00", 
      "content_html": "<p>\u65b0\u624b\u4f7f\u7528 clickhouse \uff0c\u524d\u51e0\u5929\u610f\u5916\u91cd\u542f\u4e86\u4e0b clickhouse \uff0c\u53d1\u73b0\u76d1\u63a7\u4e2d\u5185\u5b58\u4f7f\u7528\uff0c\u6025\u5267\u4e0b\u964d\uff1a\n<img alt=\"\" class=\"embedded_image\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"https://i.imgur.com/8VL1sru.jpeg\"/> </p>\n<p>\u800c\u4e0b\u964d\u7684\u7c7b\u578b\u662f cache \uff0c\u4e14\u5728\u4e0b\u964d\u4e4b\u540e\u53c8\u5728\u7f13\u6162\u4e0a\u6da8\uff0c\u6240\u4ee5\u731c\u6d4b\u80af\u5b9a\u662f\u548c clickhouse \u6709\u5173\uff0c\u6240\u4ee5\u4e00\u987f\u67e5\u8be2\uff0c\u67e5\u5230\u4e86\u4ee5\u4e0b\u6587\u6863\uff0c\u5730\u5740\uff1a <a href=\"https://clickhouse.com/docs/en/operations/query-cache\" rel=\"nofollow\">https://clickhouse.com/docs/en/operations/query-cache</a></p>\n<p><img alt=\"\" class=\"embedded_image\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"https://i.imgur.com/M22rD1k.png\"/> </p>\n<p>\u76ee\u524d\u7684\u5185\u5b58\u5360\u7528\u60c5\u51b5\uff1a\n<img alt=\"\" class=\"embedded_image\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"https://i.imgur.com/lykNEKd.png\"/> </p>\n<p>\u76ee\u524d\u73b0\u5728\u6709\u4e00\u4e9b\u7591\u60d1\uff0c\u8bf7\u5404\u4f4d\u5927\u4f6c\u89e3\u7b54\uff1a</p>\n<p>1.\u8fd9\u7ea2\u8272\u90e8\u5206 Cache \u5360\u7528\u662f clickhouse \u7684\u67e5\u8be2\u7f13\u5b58\u5360\u7528\u5417\uff1f\u82e5\u662f\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u4e00\u76f4\u4e0a\u6da8\uff0c\u4e0d\u91ca\u653e\u5462\uff1f</p>\n<p>2.\u8fd9\u90e8\u5206\u7ea2\u8272\u7684 Cache \u5360\u7528\uff0c\u4f1a\u5728\u5185\u5b58\u5feb\u6ee1\u7684\u65f6\u5019\u91ca\u653e\u5417\uff1f\u4f1a\u6709\u4ec0\u4e48\u5f71\u54cd\u5417\uff1f</p>\n", 
      "date_published": "2024-02-23T06:44:09+00:00", 
      "title": "\u7a76\u7adf\u662f\u4ec0\u4e48\u5728\u5360\u7528\u7740\u5185\u5b58", 
      "id": "https://www.v2ex.com/t/1017867"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/sunrealzhang", 
        "name": "sunrealzhang", 
        "avatar": "https://cdn.v2ex.com/gravatar/c8cb3212350a8f84ad1852a385754dce?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/1000096", 
      "date_modified": "2023-12-13T09:35:20+00:00", 
      "content_html": "<p>\u6211\u6709\u4e00\u4e2a 3000w \u884c\u7684\u6570\u636e\u8868\uff0c\u6211\u9700\u8981\u5728\u8fd9\u4e2a\u8868\u4e0a\u7edf\u8ba1\u4ece\u67d0\u4e00\u5e74\u5f00\u59cb\u65b0\u53c2\u4fdd\u7684\u4eba\u6570\uff0c\u539f\u6570\u636e\u5e93\u662f ORACLE \uff0c\u7528\u7684\u662f</p>\n<pre><code>AND A.AAC001 NOT EXISTS\n(SELECT 1\nFROM AC02_TEMP AS B WHERE A.AAC001 = B.AAC001 AND\nB.AAC030 &lt; '2018-01-01 00:00:00')\n</code></pre>\n<p>\u7684\u8bed\u6cd5,\u5728 clickhouse \u4e0a\u6211\u8bd5\u4e86 LEFT JOIN \u548c NOT IN \uff0c\u6027\u80fd\u5747\u4e0d\u7406\u60f3</p>\n<pre><code>SELECT COUNT(1)  AS \"\u65b0\u53c2\u4fdd\u4eba\u6570\"\nFROM AC02_TEMP AS A\nWHERE A.AAB301 IN (SELECT AAB301 FROM AA26 WHERE AAA148 = '130800')\nAND A.AAE200 = '41'\nAND A.AAC031 = '1'\nAND A.AAC030 &gt;= '2018-01-01 00:00:00'\nAND A.AAC001 NOT IN\n(SELECT B.AAC001\nFROM AC02_TEMP AS B\nWHERE B.AAC030 &lt; '2018-01-01 00:00:00');\n</code></pre>\n<p>\u4ee5\u4e0b\u662f explain</p>\n<pre><code>CreatingSets (Create sets before main query execution)\n  Expression ((Projection + Before ORDER BY))\n    Aggregating\n      Expression (Before GROUP BY)\n        ReadFromMergeTree (default.AC02_TEMP)\n        Indexes:\n          PrimaryKey\n            Keys: \n              AAC001\n              AAE200\n\"            Condition: and((AAC001 notIn 18692488-element set), (AAE200 in ['41', '41']))\"\n            Parts: 2/2\n            Granules: 4821/4821\n  CreatingSet (Create set for subquery)\n    Expression ((Projection + Before ORDER BY))\n      ReadFromMergeTree (default.AA26)\n      Indexes:\n        PrimaryKey\n          Condition: true\n          Parts: 1/1\n          Granules: 1/1\n\n</code></pre>\n<p>\u6211\u662f clickhouse \u65b0\u624b\uff0c\u76ee\u524d\u6ca1\u4ec0\u4e48\u5934\u7eea\uff0c\u6c42\u5927\u4f6c\u5e2e\u52a9 0.0</p>\n", 
      "date_published": "2023-12-13T09:28:29+00:00", 
      "title": "\u6c42\u5927\u4f6c\u4f18\u5316\u4e00\u4e0b 3000 \u4e07\u6570\u636e\u7684 NOT IN \u67e5\u8be2", 
      "id": "https://www.v2ex.com/t/1000096"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/dollck", 
        "name": "dollck", 
        "avatar": "https://cdn.v2ex.com/avatar/8589/aa78/529658_large.png?m=1674581804"
      }, 
      "url": "https://www.v2ex.com/t/894027", 
      "date_modified": "2022-11-10T01:37:28+00:00", 
      "content_html": "<div>\n \u6211\u6709\u4e00\u4e2a 3000w \u884c\u7684\u6570\u636e\u8868\uff0c\u7528\u6237\u8f93\u5165\u6570\u636e\u540e\uff0c\u9700\u8981\u5728\u8868\u5185 6 \u4e2a\u5b57\u6bb5\u4f9d\u6b21\u67e5\u8be2\u662f\u5426\u4e0e\u6570\u636e\u5339\u914d\uff0c\u8bd5\u8fc7 EXPLAIN SYNTAX \u4f46\u6ca1\u6709\u7528 \u73b0\u5728\u8fd0\u884c\u65f6\u95f4\u5dee\u4e0d\u591a 3-4s \u4e4b\u5185 \u5927\u5bb6\u6709\u529e\u6cd5\u5417 \u8bed\u53e5\u5982\u4e0b\uff1a\n <br/>\n<br/>WITH A AS (SELECT * FROM otherinfor) \n <br/> SELECT * FROM A where value1 = '1'UNION DISTINCT\n <br/> SELECT * FROM A where value2 = '1'UNION DISTINCT\n <br/> SELECT * FROM A where value3 = '1'UNION DISTINCT\n <br/> SELECT * FROM A where value4 = '1'UNION DISTINCT\n <br/> SELECT * FROM A where value5 = '1'UNION DISTINCT\n <br/> SELECT * FROM A where value6 = '1'\n <br/>\u4e0b\u9762\u662f\u8d34\u4e86 explain \u7684\uff1a\n <br/>\n<br/>Distinct \n <br/> Union \n <br/> Expression ((Projection + Before ORDER BY)) \n <br/> Filter ((WHERE + (Projection + Before ORDER BY))) \n <br/> ReadFromMergeTree (default.otherinfor) \n <br/> Expression ((Projection + Before ORDER BY)) \n <br/> Filter ((WHERE + (Projection + Before ORDER BY))) \n <br/> ReadFromMergeTree (default.otherinfor) \n <br/> Expression ((Projection + Before ORDER BY)) \n <br/> Filter ((WHERE + (Projection + Before ORDER BY))) \n <br/> ReadFromMergeTree (default.otherinfor) \n <br/> Expression ((Projection + Before ORDER BY)) \n <br/> Filter ((WHERE + (Projection + Before ORDER BY))) \n <br/> ReadFromMergeTree (default.otherinfor) \n <br/> Expression ((Projection + Before ORDER BY)) \n <br/> Filter ((WHERE + (Projection + Before ORDER BY))) \n <br/> ReadFromMergeTree (default.otherinfor) \n <br/> Expression ((Projection + Before ORDER BY)) \n <br/> Limit (preliminary LIMIT (without OFFSET)) \n <br/> Filter ((WHERE + (Projection + Before ORDER BY)))\n <br/> ReadFromMergeTree (default.otherinfor)\n <br/>\u7279\u522b\u611f\u8c22\u5927\u4f6c\u4eec\uff0c\u8fd9\u5bf9\u6211\u975e\u5e38\u91cd\u8981\n</div>", 
      "date_published": "2022-11-10T01:36:23+00:00", 
      "title": "\u6c42\u5927\u4f6c\u4f18\u5316 3000w \u6570\u636e\u591a UNION", 
      "id": "https://www.v2ex.com/t/894027"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/meso5533", 
        "name": "meso5533", 
        "avatar": "https://cdn.v2ex.com/gravatar/131fce800721760a2509f14906ad2fe3?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/885593", 
      "title": "clickhouse \u6587\u6863\u91cc\u7684\u5212\u5206\u51b7\u70ed\u591a\u76d8\u5b58\u50a8\u914d\u7f6e\u771f\u7684\u662f\u6309\u65f6\u95f4\u5212\u5206\u51b7\u70ed\u6570\u636e\u7684\u5417\uff1f", 
      "id": "https://www.v2ex.com/t/885593", 
      "date_published": "2022-10-09T10:32:16+00:00", 
      "content_html": "<blockquote>\n<p><a href=\"https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree/#table_engine-mergetree-multiple-volumes\" rel=\"nofollow\">https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree/#table_engine-mergetree-multiple-volumes</a></p>\n</blockquote>\n<p>move_factor\uff1awhen the amount of available space gets lower than this factor, data automatically starts to move on the next volume if any (by default, 0.1). ClickHouse sorts existing parts by size from largest to smallest (in descending order) and selects parts with the total size that is sufficient to meet the move_factor condition. If the total size of all parts is insufficient, all parts will be moved.</p>\n<p>\u770b\u6587\u6863\u7684\u89e3\u91ca\uff0c\u5e94\u8be5\u662f\u6309 part \u7684\u5927\u5c0f\u4f18\u5148\u628a\u5927\u7684 part \u79fb\u5230\u4e0b\u4e00\u4e2a\u76d8</p>\n<p>\u4f46\u662f\u4ec0\u4e48\u6837\u7684\u6570\u636e\u4f1a\u88ab\u5408\u5e76\u6210\u4e00\u4e2a part \u7684\u5462\uff1f</p>\n<p>\u5927\u7684 part \u4e00\u5b9a\u5c31\u662f\u65f6\u95f4\u4e45\u8fdc\u7684\u6570\u636e\u5417\uff1f</p>\n"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/qq1340691923", 
        "name": "qq1340691923", 
        "avatar": "https://cdn.v2ex.com/gravatar/3587bf603c7c8d5ec6be8880cb4b7e1a?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/809834", 
      "title": "\u8bf7\u6559\u5404\u4f4d\u5927\u4f6c\u5173\u4e8e clickhouse \u7684\u95ee\u9898", 
      "id": "https://www.v2ex.com/t/809834", 
      "date_published": "2021-10-22T07:49:15+00:00", 
      "content_html": "<p>\u8bf7\u95ee clickhouse \u7684\u7528\u6237\u57fa\u7840\u4fe1\u606f\u8868\u600e\u4e48\u5b58\uff0c\u662f\u5b58\u6309\u7528\u6237 id \u8fdb\u884c alter table \u4fee\u6539\u6570\u636e\uff0c\u8fd8\u662f\u5b58 ReplacingMergeTree \u5f15\u64ce\uff0c\u5b9a\u671f optimize</p>\n"
    }, 
    {
      "author": {
        "url": "https://www.v2ex.com/member/wenjun19931112", 
        "name": "wenjun19931112", 
        "avatar": "https://cdn.v2ex.com/gravatar/7faeb6a50a6986ccfef558ea6a165fa8?s=73&d=retro"
      }, 
      "url": "https://www.v2ex.com/t/781077", 
      "date_modified": "2021-08-13T10:06:07+00:00", 
      "content_html": "<p>\u6bd4\u5982\u6c42\u6bcf\u4e2a\u5ba2\u6237\u7684\u201c\u5e73\u5747\u8d2d\u4e70\u529b\u201d\u3002\n\u6211\u4eec\u8868\u8bbe\u8ba1 3 \u4e2a\u5b57\u6bb5  \uff08 userId,orderId,price \uff09\u3002\n\u4f46\u662f price \u53ef\u80fd\u4f1a\u53d8\u52a8\uff0c\u8fd9\u6761\u8bb0\u5f55\u4f1a\u88ab\u5220\u9664\uff08\u4e1a\u52a1\u539f\u56e0\uff09\u3002</p>\n<p>\u4e3a\u4e86\u652f\u6301 update\\delete\uff0c\u6211\u4eec\u9009\u62e9\u7248\u672c\u6298\u53e0\u6811\u3002\n\u4e3b\u952e\u8bbe\u7f6e (userId,orderId)\u4e24\u4e2a\u5b57\u6bb5\u3002\n\u4f46\u662f\u6211\u7684\u7edf\u8ba1\u7ef4\u5ea6\u5374\u53ea\u8981 userId \uff08\u6c42\u6bcf\u4e2a\u5ba2\u6237\u7684\u201c\u5e73\u5747\u8d2d\u4e70\u529b\u201d\uff09\uff0c\u5982\u679c\u901a\u8fc7\u4e00\u4e2a\u7ef4\u5ea6\u53bb\u805a\u5408 \u201c\u7248\u672c\u6298\u53e0\u6811\u201d\uff0c\u5f97\u5230\u7684\u6570\u636e\u53c8\u662f\u4e0d\u51c6\u786e\u7684\u3002</p>\n<p>\u6709\u4ec0\u4e48\u529e\u6cd5\u5417\uff1f</p>\n", 
      "date_published": "2021-06-03T03:17:26+00:00", 
      "title": "\u6211\u8fd9\u4e2a\u573a\u666f\uff0c clickhouse \u9002\u7528\u5417\uff1f", 
      "id": "https://www.v2ex.com/t/781077"
    }
  ]
}