{"id":10006994,"date":"2022-12-20T21:41:51","date_gmt":"2022-12-20T13:41:51","guid":{"rendered":"https:\/\/ityet.com\/?p=10006994"},"modified":"2022-12-20T21:41:51","modified_gmt":"2022-12-20T13:41:51","slug":"clickhouse%e8%a1%a8%e5%bc%95%e6%93%8e%e6%8e%a2%e7%a9%b6-replacingmergetree","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006994","title":{"rendered":"Clickhouse\u8868\u5f15\u64ce\u63a2\u7a76-ReplacingMergeTree"},"content":{"rendered":"<h2>\u4f5c\u8005\uff1a\u803f\u5b8f\u5b87<\/h2>\n<h2>1 \u8868\u5f15\u64ce\u7b80\u8ff0<\/h2>\n<h3>1.1 \u5b98\u65b9\u63cf\u8ff0<\/h3>\n<p>MergeTree \u7cfb\u5217\u7684\u5f15\u64ce\u88ab\u8bbe\u8ba1\u7528\u4e8e\u63d2\u5165\u6781\u5927\u91cf\u7684\u6570\u636e\u5230\u4e00\u5f20\u8868\u5f53\u4e2d\u3002\u6570\u636e\u53ef\u4ee5\u4ee5\u6570\u636e\u7247\u6bb5\u7684\u5f62\u5f0f\u4e00\u4e2a\u63a5\u7740\u4e00\u4e2a\u7684\u5feb\u901f\u5199\u5165\uff0c\u6570\u636e\u7247\u6bb5\u5728\u540e\u53f0\u6309\u7167\u4e00\u5b9a\u7684\u89c4\u5219\u8fdb\u884c\u5408\u5e76\u3002\u76f8\u6bd4\u5728\u63d2\u5165\u65f6\u4e0d\u65ad\u4fee\u6539\uff08\u91cd\u5199\uff09\u5df2\u5b58\u50a8\u7684\u6570\u636e\uff0c\u8fd9\u79cd\u7b56\u7565\u4f1a\u9ad8\u6548\u5f88\u591a\u3002<\/p>\n<p>ReplacingMergeTree \u5f15\u64ce\u548c MergeTree \u7684\u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\u5b83\u4f1a\u5220\u9664\u6392\u5e8f\u952e\u503c\u76f8\u540c\u7684\u91cd\u590d\u9879\u3002  <br \/>\u6570\u636e\u7684\u53bb\u91cd\u53ea\u4f1a\u5728\u6570\u636e\u5408\u5e76\u671f\u95f4\u8fdb\u884c\u3002\u5408\u5e76\u4f1a\u5728\u540e\u53f0\u4e00\u4e2a\u4e0d\u786e\u5b9a\u7684\u65f6\u95f4\u8fdb\u884c\uff0c\u56e0\u6b64\u4f60\u65e0\u6cd5\u9884\u5148\u4f5c\u51fa\u8ba1\u5212\u3002\u6709\u4e00\u4e9b\u6570\u636e\u53ef\u80fd\u4ecd\u672a\u88ab\u5904\u7406\u3002\u5c3d\u7ba1\u4f60\u53ef\u4ee5\u8c03\u7528 OPTIMIZE \u8bed\u53e5\u53d1\u8d77\u8ba1\u5212\u5916\u7684\u5408\u5e76\uff0c\u4f46\u8bf7\u4e0d\u8981\u4f9d\u9760\u5b83\uff0c\u56e0\u4e3a OPTIMIZE \u8bed\u53e5\u4f1a\u5f15\u53d1\u5bf9\u6570\u636e\u7684\u5927\u91cf\u8bfb\u5199\u3002<\/p>\n<h3>1.2 \u672c\u5730\u8868\u8bed\u6cd5<\/h3>\n<pre><code>CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster]\n(\nname1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1],\nname2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2],\n...\n) ENGINE = ReplacingMergeTree([ver])\n[PARTITION BY expr]\n[PRIMARY KEY expr]\n[ORDER BY expr]\n[SAMPLE BY expr]\n[TTL expr [DELETE|TO DISK 'xxx'|TO VOLUME 'xxx'], ...]\n[SETTINGS name=value, ...]<\/code><\/pre>\n<p><strong>\u53c2\u6570\u4ecb\u7ecd<\/strong><\/p>\n<ul>\n<li>ver \u2014 \u7248\u672c\u5217\u3002\u7c7b\u578b\u4e3a UInt*, Date \u6216 DateTime\u3002\u53ef\u9009\u53c2\u6570\u3002  <br \/>\u5728\u6570\u636e\u5408\u5e76\u7684\u65f6\u5019\uff0cReplacingMergeTree \u4ece\u6240\u6709\u5177\u6709\u76f8\u540c\u6392\u5e8f\u952e\u7684\u884c\u4e2d\u9009\u62e9\u4e00\u884c\u7559\u4e0b\uff1a  <br \/>1.\u5982\u679c ver \u5217\u672a\u6307\u5b9a\uff0c\u4fdd\u7559\u6700\u540e\u4e00\u6761\u3002  <br \/>2.\u5982\u679c ver \u5217\u5df2\u6307\u5b9a\uff0c\u4fdd\u7559 ver \u503c\u6700\u5927\u7684\u7248\u672c\u3002<\/li>\n<li>PRIMARY KEY expr \u4e3b\u952e\u3002\u5982\u679c\u8981 \u9009\u62e9\u4e0e\u6392\u5e8f\u952e\u4e0d\u540c\u7684\u4e3b\u952e\uff0c\u5728\u8fd9\u91cc\u6307\u5b9a\uff0c\u53ef\u9009\u9879\u3002  <br \/>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4e3b\u952e\u8ddf\u6392\u5e8f\u952e\uff08\u7531 ORDER BY \u5b50\u53e5\u6307\u5b9a\uff09\u76f8\u540c\u3002 \u56e0\u6b64\uff0c\u5927\u90e8\u5206\u60c5\u51b5\u4e0b\u4e0d\u9700\u8981\u518d\u4e13\u95e8\u6307\u5b9a\u4e00\u4e2a PRIMARY KEY \u5b50\u53e5\u3002<\/li>\n<li>SAMPLE BY EXPR \u7528\u4e8e\u62bd\u6837\u7684\u8868\u8fbe\u5f0f\uff0c\u53ef\u9009\u9879<\/li>\n<li>PARTITION BY expr \u5206\u533a\u952e<\/li>\n<li>\n<p>ORDER BY expr \u6392\u5e8f\u952e<\/p>\n<h3>1.3 \u5206\u533a\u8868\u8bed\u6cd5<\/h3>\n<\/li>\n<\/ul>\n<pre><code>CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster]\n(\nname1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1],\nname2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2],\n...\n) ENGINE = Distributed(cluster, database, table[, sharding_key[, policy_name]])\n[SETTINGS name=value, ...]<\/code><\/pre>\n<p>\u53c2\u6570\u4ecb\u7ecd<\/p>\n<ul>\n<li>cluster \u96c6\u7fa4\u540d<\/li>\n<li>table \u8fdc\u7a0b\u6570\u636e\u8868\u540d<\/li>\n<li>sharding_key \u5206\u7247\u89c4\u5219<\/li>\n<li>policy_name \u89c4\u5219\u540d\uff0c\u5b83\u4f1a\u88ab\u7528\u4f5c\u5b58\u50a8\u4e34\u65f6\u6587\u4ef6\u4ee5\u4fbf\u5f02\u6b65\u53d1\u9001\u6570\u636e<\/li>\n<\/ul>\n<h2>2 \u952e\u7684\u6982\u5ff5<\/h2>\n<p>Clickhouse\u7684\u90e8\u7f72\uff0c\u5206\u4e3a\u5355\u673a\u6a21\u5f0f\u548c\u96c6\u7fa4\u6a21\u5f0f\uff0c\u8fd8\u53ef\u4ee5\u5f00\u542f\u526f\u672c\u3002\u4e24\u79cd\u6a21\u5f0f\uff0c\u6570\u636e\u8868\u5728\u521b\u5efa\u8bed\u6cd5\u3001\u521b\u5efa\u6b65\u9aa4\u548c\u540e\u7eed\u7684\u4f7f\u7528\u65b9\u5f0f\u4e0a\uff0c\u5b58\u5728\u4e00\u5b9a\u7684\u5dee\u5f02\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117467\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5728\u5b9a\u4e49\u8868\u7ed3\u6784\u65f6\uff0c\u9700\u8981\u6307\u5b9a\u4e0d\u540c\u7684\u952e\uff0c\u4f5c\u7528\u5982\u4e0b\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117468\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5206\u7247\uff1a\u6240\u6709\u5206\u7247\u8282\u70b9\u7684\u6743\u91cd\u52a0\u548c\u5f97\u5230S\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3asharing\u52a8\u4f5c\u53d6\u6a21\u7684\u4f9d\u636e\uff0c\u6743\u91cdX=W\/S\u3002\u5206\u7247\u952e Mod S \u5f97\u5230\u7684\u503c\uff0c\u4e0e\u54ea\u4e2a\u5206\u7247\u8282\u70b9\u5339\u914d\uff0c\u5219\u4f1a\u5199\u5165\u54ea\u4e2a\u5206\u7247\u3002\u4e0d\u540c\u5206\u7247\u53ef\u80fd\u5b58\u5728\u4e8e\u4e0d\u540c\u7684\u96c6\u7fa4\u8282\u70b9\uff0c\u5373\u4fbf\u4e0d\u540c\u5206\u7247\u5728\u540c\u4e00\u8282\u70b9\uff0c\u4f46ck\u5728merge\u65f6\uff0c\u7ef4\u5ea6\u662f\u540c\u4e00\u5206\u533a+\u540c\u4e00\u5206\u7247\uff0c\u8fd9\u662f\u7269\u7406\u6587\u4ef6\u7684\u5408\u5e76\u8303\u56f4\u3002  <br \/>\u5982\u679c\u6211\u4eec\u6743\u91cd\u5206\u522b\u8bbe\u7f6e\u4e3a1,2,3 \u90a3\u4e48\u603b\u6743\u91cd\u662f6,\u90a3\u4e48\u603b\u533a\u95f4\u5c31\u662f[0,6),\u6392\u5728shard\u914d\u7f6e\u7b2c\u4e00\u4f4d\u7684node01,\u6743\u91cd\u5360\u6bd4\u4e3a1\/6,\u6240\u4ee5\u5c5e\u4e8e\u533a\u95f4[0,1),\u6392\u5728shard\u914d\u7f6e\u7b2c\u4e8c\u4f4d\u7684node02,\u5360\u6bd42\/6,\u6240\u4ee5\u533a\u95f4\u4e3a[1,3),\u81f3\u4e8e\u6700\u540e\u7684node03\u5c31\u662f[3,6).\u6240\u4ee5\u5982\u679crand()\u4ea7\u751f\u7684\u6570\u5b57\u9664\u4ee56\u53d6\u4f59\u843d\u5728\u54ea\u4e2a\u533a\u95f4,\u6570\u636e\u5c31\u4f1a\u5206\u53d1\u5230\u54ea\u4e2ashard,\u901a\u8fc7\u6743\u91cd\u914d\u7f6e,\u53ef\u4ee5\u5b9e\u73b0\u6570\u636e\u6309\u7167\u60f3\u8981\u7684\u6bd4\u91cd\u5206\u914d.<\/p>\n<h2>3 \u5206\u7247\u7684\u4f5c\u7528<\/h2>\n<h3>3.1 \u5206\u7247\u89c4\u5219<\/h3>\n<p>\u5728\u5206\u5e03\u5f0f\u6a21\u5f0f\u4e0b\uff0cClickHouse\u4f1a\u5c06\u6570\u636e\u5206\u4e3a\u591a\u4e2a\u5206\u7247\uff0c\u5e76\u4e14\u5206\u5e03\u5230\u4e0d\u540c\u8282\u70b9\u4e0a\u3002\u4e0d\u540c\u7684\u5206\u7247\u7b56\u7565\u5728\u5e94\u5bf9\u4e0d\u540c\u7684SQL Pattern\u65f6\uff0c\u5404\u6709\u4f18\u52bf\u3002ClickHouse\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684- &#8211; &#8211; sharding\u7b56\u7565\uff0c\u8ba9\u4e1a\u52a1\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u7528\u3002<\/p>\n<ul>\n<li>random\u968f\u673a\u5206\u7247\uff1a\u5199\u5165\u6570\u636e\u4f1a\u88ab\u968f\u673a\u5206\u53d1\u5230\u5206\u5e03\u5f0f\u96c6\u7fa4\u4e2d\u7684\u67d0\u4e2a\u8282\u70b9\u4e0a\u3002<\/li>\n<li>constant\u56fa\u5b9a\u5206\u7247\uff1a\u5199\u5165\u6570\u636e\u4f1a\u88ab\u5206\u53d1\u5230\u56fa\u5b9a\u4e00\u4e2a\u8282\u70b9\u4e0a\u3002<\/li>\n<li>column value\u5206\u7247\uff1a\u6309\u7167\u67d0\u4e00\u5217\u7684\u503c\u8fdb\u884chash\u5206\u7247\u3002<\/li>\n<li>\u81ea\u5b9a\u4e49\u8868\u8fbe\u5f0f\u5206\u7247\uff1a\u6307\u5b9a\u4efb\u610f\u5408\u6cd5\u8868\u8fbe\u5f0f\uff0c\u6839\u636e\u8868\u8fbe\u5f0f\u88ab\u8ba1\u7b97\u540e\u7684\u503c\u8fdb\u884chash\u5206\u7247\u3002<\/li>\n<\/ul>\n<h3>3.2 \u7c7b\u6bd4<\/h3>\n<p>\u4ee5MySQL\u7684\u5206\u5e93\u5206\u8868\u573a\u666f\u4e3a\u4f8b\uff1a<\/p>\n<ul>\n<li>2\u4e2a\u5e93\uff0c1\u4e2a\u8868\u52064\u4e2a\u5b50\u8868\uff0c\u91c7\u7528\u4e00\u4e3b\u4e00\u4ece\u6a21\u5f0f\u3002<\/li>\n<li>db01\u5305\u542btab-1\u548ctab-2\uff0cdb-2\u5305\u542btab-3\u548ctab-4\uff1b<\/li>\n<li>\u5728\u914d\u7f6esharding\u89c4\u5219\u65f6\uff0c\u9700\u8981\u8bbe\u7f6e\u5206\u5e93\u89c4\u5219\u3001\u5206\u8868\u89c4\u5219\uff1b  <br \/>\u4e00\u6761\u8bb0\u5f55\u5199\u5165\u65f6\uff0c\u4f1a\u8ba1\u7b97\u5b83\u8981\u5199\u5165\u54ea\u4e2a\u8868\u3001\u54ea\u4e2a\u5e93\uff0c\u5199\u5165\u7684\u8bb0\u5f55\u4f1a\u88ab\u4ece\u8282\u70b9\u590d\u5236\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e2aMySQL\u7684\u4f8b\u5b50\uff0c\u4e0eCK\u7684\u5206\u533a+\u5206\u7247+\u526f\u672c\u5728\u903b\u8f91\u4e0a\u57fa\u672c\u4e00\u81f4\u3002\u5206\u533a\u7406\u89e3\u4e3a\u6570\u636e\u5199\u5165\u54ea\u4e2a\u8868\uff0c\u5206\u7247\u53ef\u4ee5\u7406\u89e3\u4e3a\u6570\u636e\u5199\u5165\u54ea\u4e2a\u5e93\uff0c\u526f\u672c\u5219\u662f\u4ece\u8282\u70b9\u7684\u62f7\u8d1d\u3002<\/p>\n<h3>3.3 \u5206\u7247\u3001\u5206\u533a\u4e0e\u526f\u672c<\/h3>\n<p>Clickhouse\u5206\u7247\u662f\u96c6\u7fa4\u6a21\u5f0f\u4e0b\u7684\u6982\u5ff5\uff0c\u53ef\u4ee5\u7c7b\u6bd4MySQL\u7684Sharding\u903b\u8f91\uff0c\u526f\u672c\u662f\u4e3a\u4e86\u89e3\u51b3Sharing\u65b9\u6848\u4e0b\u7684\u9ad8\u53ef\u7528\u573a\u666f\u6240\u5b58\u5728\u7684\u3002  <br \/>\u4e0b\u56fe\u63cf\u8ff0\u4e86\u4e00\u5f20Merge\u8868\u7684\u5404\u7c7b\u952e\u7684\u5173\u7cfb\uff0c\u4e5f\u80fd\u53cd\u6620\u51fa\u4e00\u6761\u8bb0\u5f55\u7684\u5199\u5165\u8fc7\u7a0b\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117469\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h2>4 \u6570\u636e\u5408\u5e76\u9650\u5236<\/h2>\n<p>\u7406\u6e05\u4e86\u5206\u533a\u4e0e\u5206\u7247\u7684\u6982\u5ff5\uff0c\u4e5f\u5c31\u660e\u767dCK\u7684\u6570\u636e\u5408\u5e76\uff0c\u4e3a\u4ec0\u4e48\u8981\u9650\u5236\u76f8\u540c\u5206\u533a\u3001\u76f8\u540c\u5206\u7247\uff0c\u56e0\u4e3a\u5b83\u4eec\u5f71\u54cd\u6570\u636e\u7684\u5b58\u50a8\u4f4d\u7f6e\uff0cmerge\u64cd\u4f5c\u53ea\u80fd\u9488\u5bf9\u76f8\u540c\u7269\u7406\u4f4d\u7f6e\uff08\u5206\u533a\u76ee\u5f55\uff09\u7684\u6570\u636e\u8fdb\u884c\u64cd\u4f5c\uff0c\u800c\u5206\u7247\u4f1a\u5f71\u54cd\u6570\u636e\u5b58\u50a8\u5728\u54ea\u4e2a\u8282\u70b9\u4e0a\u3002  <br \/><strong>\u4e00\u53e5\u8bdd\uff0c\u4f7f\u7528CK\u7684ReplacingMergeTree\u5f15\u64ce\u7684\u53bb\u91cd\u7279\u6027\uff0c\u671f\u671b\u53bb\u91cd\u7684\u6570\u636e\uff0c\u5fc5\u987b\u6ee1\u8db3\u62e5\u6709 \u76f8\u540c\u6392\u5e8f\u952e\u3001\u540c\u4e00\u5206\u533a\u3001\u540c\u4e00\u5206\u7247\u3002<\/strong>  <br \/>\u63a5\u4e0b\u6765\u9488\u5bf9\u8fd9\u4e00\u8981\u6c42\uff0c\u5728\u6570\u636e\u4e0a\u8fdb\u884c\u9a8c\u8bc1\u3002<\/p>\n<h2>5 \u6570\u636e\u9a8c\u8bc1<\/h2>\n<h3>5.1 \u573a\u666f\u8bbe\u7f6e<\/h3>\n<p>\u8fd9\u91cc\u662f\u8981\u9a8c\u8bc1\u4e0a\u9762\u7684\u7ed3\u8bba\uff0c\u201c<strong>\u671f\u671b\u53bb\u91cd\u7684\u6570\u636e\uff0c\u5fc5\u987b\u6ee1\u8db3\u5728\u76f8\u540c\u6392\u5e8f\u952e\u3001\u540c\u4e00\u5206\u533a\u3001\u540c\u4e00\u5206\u7247<\/strong>\u201d\uff1b  <br \/>\u9996\u5148\u62e5\u6709\u76f8\u540c\u6392\u5e8f\u952e\u624d\u4f1a\u5728merge\u64cd\u4f5c\u65f6\u8fdb\u884c\u5224\u65ad\u4e3a\u91cd\u590d\uff0c\u56e0\u6b64\u4fdd\u8bc1\u6d4b\u8bd5\u6570\u636e\u7684\u6392\u5e8f\u952e\u76f8\u540c\uff1b\u5269\u4f59\u5f85\u6d4b\u8bd5\u573a\u666f\u5219\u662f\u5206\u533a\u4e0e\u5206\u7247\u3002  <br \/>\u7531\u6b64\u8fdb\u884c\u573a\u666f\u8bbe\u7f6e\uff1a<\/p>\n<ul>\n<li>\u76f8\u540c\u8bb0\u5f55\uff0c\u80fd\u591f\u5199\u5165\u540c\u4e00\u5206\u533a\u3001\u540c\u4e00\u5206\u7247<\/li>\n<li>\u76f8\u540c\u8bb0\u5f55\uff0c\u80fd\u591f\u5199\u5165\u540c\u4e00\u5206\u533a\uff0c\u4e0d\u540c\u5206\u7247<\/li>\n<li>\u76f8\u540c\u8bb0\u5f55\uff0c\u80fd\u591f\u5199\u5165\u4e0d\u540c\u5206\u533a\uff0c\u4e0d\u540c\u5206\u7247<\/li>\n<li>\u76f8\u540c\u8bb0\u5f55\uff0c\u80fd\u591f\u5199\u5165\u4e0d\u540c\u5206\u533a\u3001\u76f8\u540c\u5206\u7247  <br \/>\u518d\u53e0\u52a0\u540c\u6b65\u5199\u5165\u65b9\u5f0f\uff1a<\/li>\n<li>\u76f4\u63a5\u5199\u672c\u5730\u8868<\/li>\n<li>\u76f4\u63a5\u5199\u5206\u5e03\u5f0f\u8868  <br \/>\u8865\u5145\uff1a\u5206\u533a\u952e\u4e0e\u5206\u7247\u952e\uff0c\u662f\u5426\u5fc5\u987b\u76f8\u540c\uff1f<\/li>\n<\/ul>\n<h3>5.2 \u7b2c\u4e00\u5929\u6d4b\u8bd5<\/h3>\n<p><strong>\u573a\u666f1\uff1a \u76f8\u540c\u8bb0\u5f55\uff0c\u80fd\u591f\u5199\u5165\u540c\u4e00\u5206\u533a\u3001\u540c\u4e00\u5206\u7247<\/strong><\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117470\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4e00\u6b21\u6267\u884c3\u6761\u63d2\u5165\uff0c\u63d2\u5165\u672c\u5730\u8868  <br \/>[main_id=101,sku_id=SKU0002\uff1bbarnd_code=BC01,BC02,BC03]  <br \/>select * from test_ps.sku_detail_same_partition_same_shard_all;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117471\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5206\u4e09\u6b21\u6267\u884c\uff0c\u63d2\u5165\u672c\u5730\u8868  <br \/>[main_id=101,sku_id=SKU0001\uff1bbarnd_code=BC01,BC02,BC03]  <br \/>select * from test_ps.sku_detail_same_partition_same_shard_all;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117472\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5206\u4e09\u6b21\u6267\u884c\uff0c\u63d2\u5165\u5206\u5e03\u5f0f\u8868  <br \/>[main_id=101,sku_id=SKU0001\uff1bbarnd_code=BC001,BC002,BC003]  <br \/>select * from test_ps.sku_detail_same_partition_same_shard_all;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117473\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>select * from test_ps.sku_detail_same_partition_same_shard_all final;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117474\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p><strong>\u7ed3\u8bba1<\/strong>  <br \/>1.\u91c7\u7528\u5206\u5e03\u5f0f\u8868\u63d2\u5165\u6570\u636e\uff0c\u4fdd\u8bc1\u5206\u7247\u952e\u3001\u5206\u533a\u952e\u7684\u503c\u76f8\u540c\uff0c\u624d\u80fd\u4fdd\u8bc1merge\u53bb\u91cd\u6210\u529f  <br \/>\u6392\u9664\u672c\u5730\u8868\u63d2\u5165\u573a\u666f  <br \/>2.\u91c7\u7528\u672c\u5730\u8868\u63d2\u5165\u6570\u636e\uff0c\u5728\u5206\u7247\u952e\u3001\u5206\u533a\u952e\u76f8\u540c\u7684\u60c5\u51b5\u4e0b\uff0c\u65e0\u6cd5\u4fdd\u8bc1merge\u53bb\u91cd<\/p>\n<ul>\n<li>\u5728\u4e00\u4e2asession\uff08\u4e00\u6b21\u63d0\u4ea4\uff09\u91cc\u9762\u5305\u542b\u591a\u4e2a\u8bb0\u5f55\uff0c\u76f4\u63a5\u4f1a\u5f97\u5230\u4e00\u6761\u8bb0\u5f55\uff0c\u63d2\u5165\u8fc7\u7a0b\u53bb\u91cd  <br \/>\u5728\u7b2c\u4e00\u6b21insert\u65f6\uff0c\u51c6\u5907\u76843\u6761insert\u8bed\u53e5\u662f\u4e00\u6b21\u6267\u884c\u7684\uff0c\u67e5\u8be2\u540e\u53ea\u67091\u6761\u8bb0\u5f55\u3002<\/li>\n<li>\u5728\u591a\u4e2asession\uff08\u591a\u6b21\u63d0\u4ea4\uff09\u8bb0\u5f55\uff0c\u4e0d\u4f1a\u76f4\u63a5\u53bb\u91cd\uff0c\u4f46\u6709\u53ef\u80fd\u5199\u5230\u4e0d\u540c\u96c6\u7fa4\u8282\u70b9\uff0c\u5bfc\u81f4\u65e0\u6cd5\u53bb\u91cd  <br \/>\u52063\u6b21\u6267\u884c3\u6761insert\u8bed\u53e5\uff0c\u67e5\u8be2\u540e\u67093\u6761\u8bb0\u5f55\uff0c\u4e14\u901a\u8fc7final\u67e5\u8be2\u540e\u67092\u6761\u8bb0\u5f55\uff0c\u5408\u5e76\u53bb\u91cd\u7684\u90a32\u6761\u8bb0\u5f55\u662f\u5199\u5165\u5728\u540c\u4e00\u96c6\u7fa4\u8282\u70b9\u3002\u3010\u53c2\u8003SKU0002\u7684\u6267\u884c\u7ed3\u679c\u3011<\/li>\n<\/ul>\n<p>\u540e\u9762\u76f4\u63a5\u9a8c\u8bc1\u63d2\u5165\u5206\u5e03\u5f0f\u8868\u573a\u666f\u3002<\/p>\n<p><strong>\u573a\u666f2\uff1a\u76f8\u540c\u8bb0\u5f55\uff0c\u80fd\u591f\u5199\u5165\u540c\u4e00\u5206\u533a\uff0c\u4e0d\u540c\u5206\u7247<\/strong><\/p>\n<ul>\n<li>\u5206\u7247\u952e\u91c7\u7528\u7684rand()\u65b9\u5f0f\uff0c\u968f\u673a\u751f\u6210\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117475\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5206\u4e09\u6b21\u6267\u884c\uff0c\u63d2\u5165\u5206\u5e03\u5f0f\u8868  <br \/>[main_id=103,sku_id=SKU0003\uff1bbarnd_code=BC301,BC302,BC303]  <br \/>\u68c0\u67e5\u6570\u636e\u63d2\u5165\u72b6\u6001  <br \/>select * from test_ps.sku_detail_same_partition_diff_shard_all where main_id =103 ;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117476\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u68c0\u67e5merge\u7684\u53bb\u91cd\u7ed3\u679c  <br \/>select * from test_ps.sku_detail_same_partition_diff_shard_all final where main_id =103 ;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117477\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5206\u4e94\u6b21\u6267\u884c\uff0c\u63d2\u5165\u5206\u5e03\u5f0f\u8868  <br \/>[main_id=104,sku_id=SKU0004\uff1bbarnd_code=BC401,BC402,BC403,BC404,BC405]  <br \/>\u68c0\u67e5\u6570\u636e\u63d2\u5165\u72b6\u6001  <br \/>select * from test_ps.sku_detail_same_partition_diff_shard_all where main_id =104 ;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117478\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u68c0\u67e5merge\u7684\u53bb\u91cd\u7ed3\u679c  <br \/>select * from test_ps.sku_detail_same_partition_diff_shard_all final where main_id =104 ;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117479\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p><strong>\u7ed3\u8bba2<\/strong><\/p>\n<p>\u91c7\u7528\u5206\u5e03\u5f0f\u8868\u63d2\u5165\u6570\u636e\uff0c\u4fdd\u8bc1\u5206\u533a\u952e\u7684\u503c\u76f8\u540c\u3001\u5206\u7247\u952e\u7684\u503c\u968f\u673a\uff0c\u65e0\u6cd5\u4fdd\u8bc1merge\u53bb\u91cd<\/p>\n<ul>\n<li>\u5982\u679c\u63d2\u5165\u8bb0\u5f55\u65f6\uff0c\u901a\u8fc7rand()\u751f\u6210\u7684\u6570\u5b57\u53d6\u6a21\u540e\u7684\u503c\u4e00\u6837\uff0c\u5f88\u5e78\u8fd0\u6700\u7ec8\u53ef\u4ee5merge\u53bb\u91cd\u6210\u529f<\/li>\n<li>\u5982\u679c\u63d2\u5165\u8bb0\u5f55\u65f6\uff0c\u901a\u8fc7rand()\u751f\u6210\u7684\u6570\u5b57\u53d6\u6a21\u540e\u7684\u503c\u4e0d\u4e00\u6837\uff0c\u6700\u7ec8\u65e0\u6cd5\u901a\u8fc7merge\u53bb\u91cd<\/li>\n<\/ul>\n<p><strong>\u573a\u666f3\uff1a\u76f8\u540c\u8bb0\u5f55\uff0c\u80fd\u591f\u5199\u5165\u4e0d\u540c\u5206\u533a\uff0c\u4e0d\u540c\u5206\u7247<\/strong><\/p>\n<ul>\n<li>\u5206\u7247\u952e\u91c7\u7528\u7684rand()\u65b9\u5f0f\uff0c\u968f\u673a\u751f\u6210\uff1b<\/li>\n<li>\u5206\u533a\u952e\u4e3a\u4e86\u65b9\u4fbf\u6d4b\u8bd5\uff0c\u91c7\u7528\u521b\u5efa\u65f6\u95f4\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117480\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5206\u4e94\u6b21\u6267\u884c\uff0c\u63d2\u5165\u5206\u5e03\u5f0f\u8868  <br \/>[main_id=105,sku_id=SKU0005\uff1bbarnd_code=BC501,BC502,BC503,BC504,BC505]<\/p>\n<p>\u68c0\u67e5\u6570\u636e\u63d2\u5165\u72b6\u6001  <br \/>select * from test_ps.sku_detail_diff_partition_diff_shard_all where main_id =105 ;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117481\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u68c0\u67e5merge\u7684\u53bb\u91cd\u7ed3\u679c  <br \/>select * from test_ps.sku_detail_diff_partition_diff_shard_all final where main_id =105;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117482\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p><strong>\u7ed3\u8bba3<\/strong>  <br \/>\u91c7\u7528\u5206\u5e03\u5f0f\u8868\u63d2\u5165\u6570\u636e\uff0c\u5206\u533a\u952e\u7684\u503c\u4e0e\u6392\u5e8f\u952e\u4e0d\u4e00\u81f4\u3001\u5206\u7247\u952e\u7684\u503c\u968f\u673a\uff0c\u65e0\u6cd5\u4fdd\u8bc1merge\u53bb\u91cd<\/p>\n<ul>\n<li>\u6309\u5f53\u524d\u6d4b\u8bd5\u7ed3\u679c\uff0c\u867d\u7136create_time\u90fd\u4e0d\u76f8\u540c\uff0c\u4e5f\u5c31\u662f\u5206\u533a\u4e0d\u540c\uff0c\u4e5f\u53d1\u751f\u4e86\u6570\u636e\u5408\u5e76<\/li>\n<li>\u6570\u636e\u53d1\u751f\u5408\u5e76\uff0c\u4f46\u7ed3\u679c\u5e76\u4e0d\u662f\u5b8c\u5168\u6309\u6392\u5e8f\u952e\u8fdb\u884c\u5408\u5e76\u7684<\/li>\n<\/ul>\n<p><strong>\u573a\u666f4\uff1a\u76f8\u540c\u8bb0\u5f55\uff0c\u80fd\u591f\u5199\u5165 \u4e0d\u540c\u5206\u533a\u3001\u76f8\u540c\u5206\u7247<\/strong><\/p>\n<ul>\n<li>\u5206\u7247\u952e\u91c7\u7528main_id\uff1b<\/li>\n<li>\u5206\u533a\u952e\u4e3a\u4e86\u65b9\u4fbf\u6d4b\u8bd5\uff0c\u91c7\u7528\u521b\u5efa\u65f6\u95f4\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117483\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5206\u516d\u6b21\u6267\u884c\uff0c\u63d2\u5165\u5206\u5e03\u5f0f\u8868  <br \/>[main_id=106,sku_id=SKU0006\uff1bbarnd_code=BC601,BC602,BC603,BC604,BC605,BC606]<\/p>\n<p>\u68c0\u67e5\u6570\u636e\u63d2\u5165\u72b6\u6001  <br \/>select * from test_ps.sku_detail_diff_partition_same_shard_all where main_id =106 ;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117484\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u68c0\u67e5merge\u7684\u53bb\u91cd\u7ed3\u679c  <br \/>select * from test_ps.sku_detail_diff_partition_same_shard_all final where main_id =106;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117485\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6b64\u573a\u666f\uff0c\u7ecf\u8fc7\u7b2c\u4e8c\u5929\u68c0\u7d22\uff0c\u6570\u636e\u5e76\u6ca1\u6709\u8fdb\u884cmerge\uff0c\u800c\u662f\u7528final\u5173\u952e\u5b57\u4f9d\u7136\u80fd\u68c0\u7d22\u51fa\u53bb\u91cd\u540e\u7684\u7ed3\u679c\u3002\u4e5f\u5c31\u662f\u8bf4final\u5173\u952e\u5b57\u53ea\u662f\u5728\u5185\u5b58\u4e2d\u8fdb\u884c\u53bb\u91cd\uff0c\u7531\u4e8e\u6240\u5728\u5206\u533a\u4e0d\u540c\uff0c\u6587\u4ef6\u662f\u6ca1\u6709\u8fdb\u884cmerge\u5408\u5e76\u7684\uff0c\u4e5f\u5c31\u6ca1\u6709\u53bb\u91cd\u3002\u53cd\u89c2\u76f8\u540c\u5206\u533a\u3001\u76f8\u540c\u5206\u7247\u7684\u6570\u636e\u8868\uff0c\u6570\u636e\u5df2\u7ecf\u5b8c\u6210\u4e86merge\u5408\u5e76\uff0c\u666e\u901a\u68c0\u7d22\u53ea\u80fd\u5f97\u5230\u4e00\u6761\u8bb0\u5f55\u3002<\/p>\n<p><strong>\u7ed3\u8bba4<\/strong>  <br \/>\u91c7\u7528\u5206\u5e03\u5f0f\u8868\u63d2\u5165\u6570\u636e\uff0c\u5206\u533a\u952e\u7684\u503c\u4e0e\u6392\u5e8f\u952e\u4e0d\u4e00\u81f4\u3001\u5206\u7247\u952e\u7684\u503c\u56fa\u5b9a\uff0c\u65e0\u6cd5\u5b9e\u73b0merge\u53bb\u91cd<\/p>\n<h3>5.3 \u7b2c\u4e8c\u5929\u68c0\u67e5<\/h3>\n<p>\u4ee5\u4e0b\u5747\u91c7\u7528\u666e\u901a\u67e5\u8be2\uff0c\u53d1\u73b0\u5982\u4e0b\u60c5\u51b5<\/p>\n<ul>\n<li>\u5206\u7247\u4e0d\u540c\u7684\u8868\uff0c\u5176\u6570\u636e\u6ca1\u6709\u5408\u5e76<\/li>\n<li>\u5206\u7247\u76f8\u540c\u3001\u5206\u533a\u4e0d\u540c\u7684\u6ca1\u6709\u5408\u5e76<\/li>\n<li>\u5206\u7247\u76f8\u540c\u3001\u5206\u533a\u76f8\u540c\u7684\u5df2\u7ecf\u5b8c\u6210\u4e86\u5408\u5e76<\/li>\n<\/ul>\n<p>select * from test_ps.sku_detail_same_partition_same_shard_all;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117486\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>select * from test_ps.sku_detail_same_partition_diff_shard_all;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117487\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>select * from test_ps.sku_detail_diff_partition_diff_shard_all;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117488\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>select * from test_ps.sku_detail_diff_partition_same_shard_all;<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043117489\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h2>6 \u603b\u7ed3<\/h2>\n<p>\u6839\u636e\u6d4b\u8bd5\u7ed3\u679c\uff0c\u5728\u4e0d\u540c\u573a\u666f\u4e0b\u7684\u5408\u5e76\u60c5\u51b5\uff1a<\/p>\n<ul>\n<li>\u5982\u679c\u6570\u636e\u5b58\u5728\u5728\u76f8\u540c\u5206\u7247\uff0c\u4e14\u76f8\u540c\u5206\u533a\uff0c\u7edd\u5bf9\u53ef\u4ee5\u5b9e\u73b0\u5408\u5e76\u53bb\u91cd\u3002<\/li>\n<li>\u5982\u679c\u6570\u636e\u5b58\u50a8\u5728\u4e0d\u540c\u5206\u7247\uff0c\u4e0d\u540c\u5206\u533a\uff0c\u5c06\u4e0d\u4f1a\u8fdb\u884c\u5408\u5e76\u53bb\u91cd\u3002<\/li>\n<li>\u5982\u679c\u6570\u636e\u5b58\u50a8\u5728\u4e0d\u540c\u5206\u7247\uff0c\u4f46\u540c\u4e00\u5206\u7247\u5185\u4fdd\u8bc1\u5728\u76f8\u540c\u5206\u533a\uff0c\u4f1a\u8fdb\u884c\u6b64\u5206\u7247\u4e0b\u7684merge\u53bb\u91cd\u3002<\/li>\n<li>\u5982\u679c\u6570\u636e\u5b58\u5728\u5728\u76f8\u540c\u5206\u7247\uff0c\u4f46\u4e0d\u540c\u5206\u533a\uff0c\u4e0d\u4f1a\u8fdb\u884cmerge\u53bb\u91cd\uff0c\u4f46\u901a\u8fc7final\u5173\u952e\u5b57\u53ef\u4ee5\u5728CK\u5185\u5b58\u4e2d\u5bf9\u76f8\u540c\u5206\u533a\u3001\u76f8\u540c\u5206\u7247\u7684\u6570\u636e\u8fdb\u884c\u53bb\u91cd\u3002<\/li>\n<\/ul>\n<p>\u5728Clickhouse\u7684ReplacingMergeTree\u8fdb\u884cmerge\u64cd\u4f5c\u65f6\uff0c\u662f\u6839\u636e\u6392\u5e8f\u952e\uff08order by\uff09\u6765\u8bc6\u522b\u662f\u5426\u91cd\u590d\u3001\u662f\u5426\u9700\u8981\u5408\u5e76\u3002\u800c\u5206\u533a\u548c\u5206\u7247\uff0c\u5f71\u54cd\u7684\u662f\u6570\u636e\u7684\u5b58\u50a8\u4f4d\u7f6e\uff0c\u5728\u54ea\u4e2a\u96c6\u7fa4\u8282\u70b9\u3001\u5728\u54ea\u4e2a\u6587\u4ef6\u76ee\u5f55\u3002\u90a3\u4e48\u6700\u7ec8ReplacingMergeTree\u8868\u5f15\u64ce\u5728\u5408\u5e76\u65f6\uff0c\u53ea\u4f1a\u5728\u5f53\u524d\u8282\u70b9\u3001\u4e14\u7269\u7406\u4f4d\u7f6e\u5728\u540c\u4e00\u8868\u76ee\u5f55\u4e0b\u7684\u6570\u636e\u8fdb\u884cmerge\u64cd\u4f5c\u3002<\/p>\n<p>\u6700\u540e\uff0c\u6211\u4eec\u5728\u8bbe\u8ba1\u8868\u65f6\uff0c\u5982\u679c\u671f\u671b\u5229\u7528\u5230ReplacingMergeTree\u81ea\u52a8\u53bb\u91cd\u7684\u7279\u6027\uff0c\u90a3\u4e48<strong>\u5fc5\u987b\u4f7f\u5176\u5b58\u50a8\u5728\u76f8\u540c\u5206\u533a\u3001\u76f8\u540c\u5206\u7247\u4e0b\uff1b<\/strong> \u800c\u5728\u8bbe\u7f6e\u5206\u533a\u952e\u3001\u5206\u7247\u952e\u65f6\uff0c\u4e8c\u8005\u4e0d\u8981\u6c42\u5fc5\u987b\u76f8\u540c\uff0c\u4f46\u5fc5\u987b\u7a33\u5b9a\uff0c\u7a33\u5b9a\u7684\u542b\u4e49\u662f\u5165\u53c2\u76f8\u540c\u51fa\u53c2\u5fc5\u987b\u76f8\u540c\u3002<\/p>\n<p>\u200b<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000043117465\">https:\/\/segmentfault.com\/a\/1190000043117465<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u803f\u5b8f\u5b87 1 \u8868\u5f15\u64ce\u7b80\u8ff0 1.1 \u5b98\u65b9\u63cf\u8ff0 MergeTree \u7cfb\u5217\u7684\u5f15\u64ce\u88ab\u8bbe\u8ba1\u7528\u4e8e\u63d2\u5165\u6781\u5927\u91cf\u7684\u6570\u636e\u5230\u4e00\u5f20 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10006994","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006994"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006994\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}