{"id":589,"date":"2020-07-22T13:05:06","date_gmt":"2020-07-22T05:05:06","guid":{"rendered":"http:\/\/www.gbase8.cn\/?p=589"},"modified":"2021-05-12T15:41:04","modified_gmt":"2021-05-12T07:41:04","slug":"gbase-8a%e9%9b%86%e7%be%a4%e9%80%9a%e8%bf%87sql%e6%9f%a5%e8%af%a2%e5%8a%a0%e8%bd%bd%e5%8e%86%e5%8f%b2%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/589","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u96c6\u7fa4\u901a\u8fc7SQL\u67e5\u8be2\u52a0\u8f7d\u5386\u53f2\u8bb0\u5f55\u65e5\u5fd7"},"content":{"rendered":"<p>GBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\uff0c\u901a\u8fc7load\u52a0\u8f7d\u5165\u5e93\uff0c\u5e76\u5728\u52a0\u8f7d\u5b8c\u6210\u540e\uff0c\u5c06\u52a0\u8f7d\u4fe1\u606f\u8bb0\u5f55\u5230\u6587\u4ef6loader_result.log\u65e5\u5fd7\u6587\u4ef6\u91cc\uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u884c\u5bf9\u6587\u4ef6\u8fdb\u884c\u5206\u6790\u3002\u6570\u636e\u5e93\u4e5f\u63d0\u4f9b\u4e86SQL\u7684\u65b9\u5f0f\u4ece\u5143\u6570\u636e\u8868load_result\u67e5\u8be2\u3002\u5982\u679c\u52a0\u8f7d\u65e5\u5fd7\u884c\u6570\u975e\u5e38\u591a\uff0c\u5c06\u5360\u7528\u5f88\u591a\u7684\u5185\u5b58\u8d44\u6e90\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2a9d5851524\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2a9d5851524\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/589\/#1%E3%80%81%E5%8A%A0%E8%BD%BD%E6%97%A5%E5%BF%97%E6%96%87%E4%BB%B6%E4%BF%9D%E5%AD%98%E8%B7%AF%E5%BE%84\" >1\u3001\u52a0\u8f7d\u65e5\u5fd7\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/589\/#2%E3%80%81%E9%80%9A%E8%BF%87SQL%E6%9F%A5%E8%AF%A2%E5%BD%93%E5%89%8D%E8%8A%82%E7%82%B9%E5%8F%91%E8%B5%B7%E7%9A%84%E5%8A%A0%E8%BD%BD%E7%BB%93%E6%9E%9C%E8%AE%B0%E5%BD%95\" >2\u3001\u901a\u8fc7SQL\u67e5\u8be2\u5f53\u524d\u8282\u70b9\u53d1\u8d77\u7684\u52a0\u8f7d\u7ed3\u679c\u8bb0\u5f55<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/589\/#3%E3%80%81SQL%E6%9F%A5%E8%AF%A2%E6%95%B4%E4%B8%AA%E9%9B%86%E7%BE%A4%E6%89%80%E6%9C%89%E8%8A%82%E7%82%B9%E5%8F%91%E8%B5%B7%E7%9A%84%E5%8A%A0%E8%BD%BD%E7%BB%93%E6%9E%9C%E8%AE%B0%E5%BD%95\" >3\u3001SQL\u67e5\u8be2\u6574\u4e2a\u96c6\u7fa4\u6240\u6709\u8282\u70b9\u53d1\u8d77\u7684\u52a0\u8f7d\u7ed3\u679c\u8bb0\u5f55<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1%E3%80%81%E5%8A%A0%E8%BD%BD%E6%97%A5%E5%BF%97%E6%96%87%E4%BB%B6%E4%BF%9D%E5%AD%98%E8%B7%AF%E5%BE%84\"><\/span>1\u3001\u52a0\u8f7d\u65e5\u5fd7\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>\u52a0\u8f7d\u5b8c\u6210\u65f6\u5c06\u52a0\u8f7d\u7ed3\u679c\u4fe1\u606f\uff0c\u6ca1\u6709\u5199\u5165\u5230\u771f\u5b9e\u7684\u8868\u91cc\u9762\uff0c\u800c\u662f\u5199\u5165\u5230\u65e5\u5fd7\u6587\u4ef6 loader_result.log \u4e2d\uff0c\u52a0\u8f7d\u7ed3 \u679c\u4fe1\u606f\u662f\u4ee5\u2019|\u2019\u4e3a\u5217\u5206\u9694\u7b26\uff0c\u4ee5\u2019\\n\u2019\u4e3a\u884c\u5206\u9694\u7b26\u5b58\u50a8\u7684\u666e\u901a\u6587\u672c\u6587\u4ef6\uff0c\u5b58\u653e\u5728\u53d1\u8d77 \u8282\u70b9 gcluster($GCLUSTER_HOM\/log\/gcluster\/)\u65e5\u5fd7\u76ee\u5f55\uff0c\u4e0d\u652f\u6301\u6307\u5b9a\u5b58\u653e\u8def \u5f84\u3002<\/p>\n\n\n\n<p>\u53ef\u4ee5\u901a\u8fc7\u6587\u4ef6\uff0c\u76f4\u63a5\u770b\u5230\u6bcf\u6b21\u52a0\u8f7d\u7684\u7ed3\u679c\u3002\u5982\u679c\u6587\u4ef6\u5f88\u5927\uff0c\u540e\u9762\u7684\u901a\u8fc7SQL\u7684\u65b9\u5f0f\u8017\u65f6\u4f1a\u5f88\u957f\uff0c\u5e76\u5360\u7528\u5927\u91cf\u5185\u5b58\uff0c\u5efa\u8bae\u7528\u6587\u4ef6\u6392\u67e5\u6216\u7edf\u8ba1\u3002<\/p>\n\n\n\n<p>SQL\u65b9\u5f0f\u662f\u901a\u8fc7\u6bcf\u6b21\u52a0\u8f7d\u6574\u4e2a\u6587\u4ef6\u5230\u4e00\u4e2a\u5185\u5b58\u8868(memory\u5f15\u64ce),\u7136\u540e\u63d0\u4f9b\u4e86SQL\u67e5\u8be2\u65b9\u5f0f\uff0c\u6240\u4ee5\u6bcf\u6b21\u67e5\u8be2\u90fd\u4f1a\u91cd\u65b0\u52a0\u8f7d\u5165\u5e93\u3002<\/p>\n\n\n\n<p>\u5efa\u8bae\uff0c\u5982\u679c\u771f\u7684\u8981\u5bf9\u5f88\u957f\u65f6\u95f4\u7684\u6570\u636e\u8fdb\u884c\u7edf\u8ba1\u5206\u6790\uff0c\u53ef\u4ee5\u5148\u628a\u6570\u636eload\u5230\u4e00\u4e2a\u81ea\u884c\u521b\u5efa\u7684\u8868(express\u5f15\u64ce)\u91cc\u9762\uff0c\u7136\u540e\u518d\u7edf\u8ba1\u5206\u6790\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2%E3%80%81%E9%80%9A%E8%BF%87SQL%E6%9F%A5%E8%AF%A2%E5%BD%93%E5%89%8D%E8%8A%82%E7%82%B9%E5%8F%91%E8%B5%B7%E7%9A%84%E5%8A%A0%E8%BD%BD%E7%BB%93%E6%9E%9C%E8%AE%B0%E5%BD%95\"><\/span>2\u3001\u901a\u8fc7SQL\u67e5\u8be2\u5f53\u524d\u8282\u70b9\u53d1\u8d77\u7684\u52a0\u8f7d\u7ed3\u679c\u8bb0\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> select * from information_schema.load_result where task_id=17\\G\n*************************** 1. row ***************************\n        TASK_ID: 17\n        DB_NAME: testdb\n        TB_NAME: dim_busi_info_20170527_test\n           USER: root\n      ACCESS_IP: 192.168.174.61\n        HOST_IP: 192.168.174.61\n     START_TIME: 2017-09-21 14:48:00\n       END_TIME: 2017-09-21 14:48:02\n   ELAPSED_TIME: 2\n     TOTAL_SIZE: 429542\n  AVERAGE_SPEED: 214771\n LOADED_RECORDS: 6878\nSKIPPED_RECORDS: 1\n  IGNORED_FILES: 0\n         RESULT: SUCCESS\n        SQL_CMD: LOAD DATA INFILE 'ftp:\/\/gbase:*****@192.168.174.61\/dim_busi_info_20170527_test' into table dim_busi_info_20170527_test fields terminated by ','\n        MESSAGE: \n1 row in set (Elapsed: 00:00:00.01)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3%E3%80%81SQL%E6%9F%A5%E8%AF%A2%E6%95%B4%E4%B8%AA%E9%9B%86%E7%BE%A4%E6%89%80%E6%9C%89%E8%8A%82%E7%82%B9%E5%8F%91%E8%B5%B7%E7%9A%84%E5%8A%A0%E8%BD%BD%E7%BB%93%E6%9E%9C%E8%AE%B0%E5%BD%95\"><\/span>3\u3001SQL\u67e5\u8be2\u6574\u4e2a\u96c6\u7fa4\u6240\u6709\u8282\u70b9\u53d1\u8d77\u7684\u52a0\u8f7d\u7ed3\u679c\u8bb0\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> select * from information_schema.cluster_load_result where task_id=17\\G\n*************************** 1. row ***************************\n        TASK_ID: 17\n        DB_NAME: testdb\n        TB_NAME: dim_busi_info_20170527_test\n           USER: root\n      ACCESS_IP: 192.168.174.61\n        HOST_IP: 192.168.174.61\n     START_TIME: 2017-09-21 14:48:00\n       END_TIME: 2017-09-21 14:48:02\n   ELAPSED_TIME: 2\n     TOTAL_SIZE: 429542\n  AVERAGE_SPEED: 214771\n LOADED_RECORDS: 6878\nSKIPPED_RECORDS: 1\n  IGNORED_FILES: 0\n         RESULT: SUCCESS\n        SQL_CMD: LOAD DATA INFILE 'ftp:\/\/gbase:*****@192.168.174.61\/dim_busi_info_20170527_test' into table dim_busi_info_20170527_test fields terminated by ','\n        MESSAGE: \n1 row in set (Elapsed: 00:00:00.02)\n<\/code><\/pre>\n\n\n\n<p>\u5bf9\u5e94\u5b57\u6bb5\u542b\u4e49\u5982\u4e0b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gbase8.cn\/wp-content\/uploads\/2020\/07\/image-30.png\" alt=\"\" class=\"wp-image-590\" width=\"286\" height=\"390\"\/><\/figure>\n\n\n\n<p>\u67e5\u770b\u52a0\u8f7d\u9519\u8bef\u6570\u636e\u7684\u65b9\u6cd5\uff0c\u8bf7\u53c2\u8003<\/p>\n\n\n\n<p><a href=\"http:\/\/www.gbase8.cn\/en\/?p=565\">GBase 8a\u96c6\u7fa4\u901a\u8fc7SQL\u83b7\u5f97\u52a0\u8f7d\u9519\u8bef\u6570\u636e\u4fe1\u606f\u65e5\u5fd7<\/a><\/p>\n\n\n\n<p>\u5e38\u89c1\u52a0\u8f7d\u9519\u8bef\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003<\/p>\n\n\n\n<p><a href=\"http:\/\/www.gbase8.cn\/en\/?p=984\">GBase 8a\u6570\u636e\u5e93\u52a0\u8f7dLOAD\u62a5\u9519\u4fe1\u606f\u5206\u6790\u548c\u89e3\u51b3\u6587\u7ae0\u6c47\u603b<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u5357\u5927\u901a\u7528GBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\uff0c\u901a\u8fc7load\u52a0\u8f7d\u5165\u5e93\uff0c\u5e76\u5728\u52a0\u8f7d\u5b8c\u6210\u540e\uff0c\u5c06\u52a0\u8f7d\u4fe1\u606f\u8bb0\u5f55\u5230\u6587\u4ef6loader_result.log\u65e5\u5fd7\u6587\u4ef6\u91cc\uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u884c\u5bf9\u6587\u4ef6\u8fdb\u884c\u5206\u6790\u3002\u6570\u636e\u5e93\u4e5f\u63d0\u4f9b\u4e86SQL\u7684\u65b9\u5f0f\u4ece\u5143\u6570\u636e\u8868load_result\u67e5\u8be2\u3002\u5982\u679c\u52a0\u8f7d\u65e5\u5fd7\u884c\u6570\u975e\u5e38\u591a\uff0c\u5c06\u5360\u7528\u5f88\u591a\u7684\u5185\u5b58\u8d44\u6e90\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[10,69,28],"class_list":["post-589","post","type-post","status-publish","format-standard","hentry","category-gbase8a","tag-10","tag-69","tag-28"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=589"}],"version-history":[{"count":3,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/589\/revisions"}],"predecessor-version":[{"id":1160,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/589\/revisions\/1160"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}