{"id":30243,"date":"2025-04-20T18:06:37","date_gmt":"2025-04-20T10:06:37","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/30243.html"},"modified":"2025-04-20T18:06:37","modified_gmt":"2025-04-20T10:06:37","slug":"%e4%bd%bf%e7%94%a8gds%e4%bb%8e%e8%bf%9c%e7%ab%af%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%af%bc%e5%85%a5%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/30243.html","title":{"rendered":"\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e"},"content":{"rendered":"<p>\u8981\u4ecb\u7ecd\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e\u7684\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<h2 id=\"section-de2ecaee76c6246e\">\u6559\u7a0b\u6307\u5f15<\/h2>\n<p>\u672c\u6559\u7a0b\u65e8\u5728\u6f14\u793a\u4f7f\u7528GDS&#xff08;General Data Service&#xff09;\u5de5\u5177\u5c06\u8fdc\u7aef\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5bfc\u5165DWS\u4e2d\u7684\u529e\u6cd5&#xff0c;\u5e2e\u52a9\u60a8\u5b66\u4e60\u5982\u4f55\u901a\u8fc7GDS\u8fdb\u884c\u6570\u636e\u5bfc\u5165\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u5728\u672c\u6559\u7a0b\u4e2d&#xff0c;\u60a8\u5c06&#xff1a;<\/p>\n<ul>\n<li>\u751f\u6210\u672c\u6559\u7a0b\u9700\u8981\u4f7f\u7528\u7684CSV\u683c\u5f0f\u7684\u6570\u636e\u6e90\u6587\u4ef6\u3002<\/li>\n<li>\u5c06\u6570\u636e\u6e90\u6587\u4ef6\u4e0a\u4f20\u5230\u6570\u636e\u670d\u52a1\u5668\u3002<\/li>\n<li>\u521b\u5efa\u5916\u8868&#xff0c;\u7528\u4e8e\u5bf9\u63a5GDS\u548cDWS&#xff0c;\u53ca\u5c06\u6570\u636e\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5f15\u6d41\u5230DWS\u96c6\u7fa4\u4e2d\u3002<\/li>\n<li>\u542f\u52a8DWS\u5e76\u521b\u5efa\u6570\u636e\u5e93\u8868\u540e&#xff0c;\u5c06\u6570\u636e\u5bfc\u5165\u5230\u8868\u4e2d\u3002<\/li>\n<li>\u6839\u636e\u9519\u8bef\u8868\u4e2d\u7684\u63d0\u793a\u8bca\u65ad\u52a0\u8f7d\u9519\u8bef\u5e76\u66f4\u6b63\u8fd9\u4e9b\u9519\u8bef\u3002<\/li>\n<\/ul>\n<h2 id=\"section-9f2123242129dced\">\u51c6\u5907ECS\u4f5c\u4e3aGDS\u670d\u52a1\u5668<\/h2>\n<p>\u521b\u5efaLinux\u5f39\u6027\u4e91\u4e3b\u673a\u7684\u64cd\u4f5c\u6b65\u9aa4&#xff0c;\u8bf7\u53c2\u89c1\u300a\u5f39\u6027\u4e91\u4e3b\u673a-\u7528\u6237\u6307\u5357\u300b\u4e2d\u7684\u201c\u521b\u5efa\u5f39\u6027\u4e91\u4e3b\u673a\u201d\u3002\u521b\u5efa\u540e&#xff0c;\u8bf7\u53c2\u89c1\u300a\u5f39\u6027\u4e91\u4e3b\u673a-\u7528\u6237\u6307\u5357\u300b\u4e2d\u7684\u201c\u767b\u5f55Linux\u5f39\u6027\u4e91\u4e3b\u673a\u201d\u7ae0\u8282\u8fdb\u884c\u767b\u5f55\u3002<\/p>\n<p>\u8bf4\u660e<\/p>\n<p>l\u00a0 ECS\u64cd\u4f5c\u7cfb\u7edf\u5fc5\u987b\u662fGDS\u5de5\u5177\u5305\u6240\u652f\u6301\u7684\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n<p>l\u00a0 ECS\u4e0eDWS\u5904\u4e8e\u540c\u4e00\u533a\u57df\u3001\u540c\u4e00\u865a\u62df\u79c1\u6709\u4e91\u548c\u5b50\u7f51\u3002<\/p>\n<p>l\u00a0 ECS\u5b89\u5168\u7ec4\u89c4\u5219\u9700\u653e\u901aDWS\u96c6\u7fa4\u7684\u8bbf\u95ee&#xff0c;\u5373\u5b89\u5168\u7ec4\u5165\u89c4\u5219&#xff1a;<\/p>\n<p>l\u00a0 \u534f\u8bae&#xff1a;TCP<\/p>\n<p>l\u00a0 \u7aef\u53e3\u8303\u56f4&#xff1a;5000<\/p>\n<p>l\u00a0 \u6e90\u5730\u5740&#xff1a;\u9009\u62e9\u201cIP\u5730\u5740\u201d&#xff0c;\u8f93\u5165DWS \u96c6\u7fa4\u5730\u5740&#xff0c;\u4f8b\u5982\u201c192.168.0.10\/32\u201d\u3002<\/p>\n<p>l\u00a0 ECS\u5185\u90e8\u5982\u679c\u542f\u7528\u4e86\u9632\u706b\u5899&#xff0c;\u9700\u8981\u4fdd\u8bc1\u9632\u706b\u5899\u6253\u5f00\u4e86GDS\u670d\u52a1\u7684\u76d1\u542c\u7aef\u53e3&#xff1a;<\/p>\n<p>iptables\u00a0 -I INPUT -p tcp -m tcp &#8211;dport -j ACCEPT<\/p>\n<h2 id=\"section-75d51fb5e3d2b789\">\u4e0b\u8f7dGDS\u5de5\u5177\u5305<\/h2>\n<p>1.\u767b\u5f55DWS\u7ba1\u7406\u63a7\u5236\u53f0\u3002<\/p>\n<p>2.\u5728\u5de6\u4fa7\u5bfc\u822a\u680f\u4e2d&#xff0c;\u5355\u51fb\u201c\u8fde\u63a5\u7ba1\u7406\u201d\u3002<\/p>\n<p>3.\u5728\u201cgsql\u547d\u4ee4\u884c\u5ba2\u6237\u7aef\u201d\u7684\u4e0b\u62c9\u5217\u8868\u4e2d&#xff0c;\u9009\u62e9\u5bf9\u5e94\u7248\u672c\u7684DWS \u5ba2\u6237\u7aef\u3002<\/p>\n<p>\u8bf7\u6839\u636e\u96c6\u7fa4\u7248\u672c\u548c\u5b89\u88c5\u5ba2\u6237\u7aef\u7684\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u9009\u62e9\u5bf9\u5e94\u7248\u672c\u3002<\/p>\n<li>\u5355\u51fb\u201c\u4e0b\u8f7d\u201d\u3002<\/li>\n<h2 id=\"section-13bac9ee7be6434e\">\u51c6\u5907\u6570\u636e\u6e90\u6587\u4ef6<\/h2>\n<ul>\n<li>\u6570\u636e\u6587\u4ef6\u201cproduct_info0.csv\u201d<\/li>\n<\/ul>\n<p>100,XHDK-A,2017-09-01,A,2017 Shirt Women,red,M,328,2017-09-04,715,good!<br \/>\n205,KDKE-B,2017-09-01,A,2017 T-shirt Women,pink,L,584,2017-09-05,40,very good!<br \/>\n300,JODL-X,2017-09-01,A,2017 T-shirt men,red,XL,15,2017-09-03,502,Bad.<br \/>\n310,QQPX-R,2017-09-02,B,2017 jacket women,red,L,411,2017-09-05,436,It&#039;s nice.<br \/>\n150,ABEF-C,2017-09-03,B,2017 Jeans Women,blue,M,123,2017-09-06,120,good.<\/p>\n<ul>\n<li>\u6570\u636e\u6587\u4ef6\u201cproduct_info1.csv\u201d<\/li>\n<\/ul>\n<p>200,BCQP-E,2017-09-04,B,2017 casual pants men,black,L,997,2017-09-10,301,good quality.<br \/>\n250,EABE-D,2017-09-10,A,2017 dress women,black,S,841,2017-09-15,299,This dress fits well.<br \/>\n108,CDXK-F,2017-09-11,A,2017 dress women,red,M,85,2017-09-14,22,It&#039;s really amazing to buy.<br \/>\n450,MMCE-H,2017-09-11,A,2017 jacket women,white,M,114,2017-09-14,22,very good.<br \/>\n260,OCDA-G,2017-09-12,B,2017 woolen coat women,red,L,2004,2017-09-15,826,Very comfortable.<\/p>\n<ul>\n<li>\u6570\u636e\u6587\u4ef6\u201cproduct_info2.csv\u201d<\/li>\n<\/ul>\n<p>980,&#034;ZKDS-J&#034;,2017-09-13,&#034;B&#034;,&#034;2017 Women&#039;s Cotton Clothing&#034;,&#034;red&#034;,&#034;M&#034;,112,,,<br \/>\n98,&#034;FKQB-I&#034;,2017-09-15,&#034;B&#034;,&#034;2017 new shoes men&#034;,&#034;red&#034;,&#034;M&#034;,4345,2017-09-18,5473<br \/>\n50,&#034;DMQY-K&#034;,2017-09-21,&#034;A&#034;,&#034;2017 pants men&#034;,&#034;red&#034;,&#034;37&#034;,28,2017-09-25,58,&#034;good&#034;,&#034;good&#034;,&#034;good&#034;<br \/>\n80,&#034;GKLW-l&#034;,2017-09-22,&#034;A&#034;,&#034;2017 Jeans Men&#034;,&#034;red&#034;,&#034;39&#034;,58,2017-09-25,72,&#034;Very comfortable.&#034;<br \/>\n30,&#034;HWEC-L&#034;,2017-09-23,&#034;A&#034;,&#034;2017 shoes women&#034;,&#034;red&#034;,&#034;M&#034;,403,2017-09-26,607,&#034;good!&#034;<br \/>\n40,&#034;IQPD-M&#034;,2017-09-24,&#034;B&#034;,&#034;2017 new pants Women&#034;,&#034;red&#034;,&#034;M&#034;,35,2017-09-27,52,&#034;very good.&#034;<br \/>\n50,&#034;LPEC-N&#034;,2017-09-25,&#034;B&#034;,&#034;2017 dress Women&#034;,&#034;red&#034;,&#034;M&#034;,29,2017-09-28,47,&#034;not good at all.&#034;<br \/>\n60,&#034;NQAB-O&#034;,2017-09-26,&#034;B&#034;,&#034;2017 jacket women&#034;,&#034;red&#034;,&#034;S&#034;,69,2017-09-29,70,&#034;It&#039;s beautiful.&#034;<br \/>\n70,&#034;HWNB-P&#034;,2017-09-27,&#034;B&#034;,&#034;2017 jacket women&#034;,&#034;red&#034;,&#034;L&#034;,30,2017-09-30,55,&#034;I like it so much&#034;<br \/>\n80,&#034;JKHU-Q&#034;,2017-09-29,&#034;C&#034;,&#034;2017 T-shirt&#034;,&#034;red&#034;,&#034;M&#034;,90,2017-10-02,82,&#034;very good.&#034;<\/p>\n<p>1.\u65b0\u5efa\u6587\u672c\u6587\u6863\u5e76\u4f7f\u7528\u672c\u5730\u7f16\u8f91\u5de5\u5177&#xff08;\u4f8b\u5982Visual Studio Code&#xff09;\u6253\u5f00\u540e&#xff0c;\u5c06\u793a\u4f8b\u6570\u636e\u62f7\u8d1d\u8fdb\u6587\u672c\u6587\u6863\u4e2d\u3002<\/p>\n<p>2.\u9009\u62e9\u201c\u683c\u5f0f&gt;\u4ee5UTF-8\u65e0BOM\u683c\u5f0f\u7f16\u7801\u201d\u3002<\/p>\n<p>3.\u9009\u62e9\u201c\u6587\u4ef6&gt;\u53e6\u5b58\u4e3a\u201d\u3002<\/p>\n<p>4.\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\u8f93\u5165\u6587\u4ef6\u540d\u540e&#xff0c;\u5c06\u6587\u4ef6\u540e\u7f00\u8bbe\u4e3a.csv&#xff0c;\u5355\u51fb\u201c\u4fdd\u5b58\u201d\u3002<\/p>\n<p>5.\u4ee5root\u7528\u6237\u767b\u5f55GDS\u670d\u52a1\u5668\u3002<\/p>\n<p>6.\u521b\u5efa\u6570\u636e\u6587\u4ef6\u5b58\u653e\u76ee\u5f55\u201c\/input_data\u201d\u3002<\/p>\n<p>mkdir -p \/input_data<\/p>\n<p>7.\u4f7f\u7528MobaXterm\u5c06\u6570\u636e\u6e90\u6587\u4ef6\u4e0a\u4f20\u81f3\u4e0a\u4e00\u6b65\u6240\u521b\u5efa\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n<h2 id=\"section-bcc5244fed546ec0\">\u5b89\u88c5\u5e76\u542f\u52a8GDS<\/h2>\n<p>1.\u4ee5root\u7528\u6237\u767b\u5f55GDS\u670d\u52a1\u5668&#xff0c;\u521b\u5efa\u5b58\u653eGDS\u5de5\u5177\u5305\u7684\u76ee\u5f55\/opt\/bin\/dws*\u3002*<\/p>\n<p>mkdir -p \/opt\/bin\/dws<\/p>\n<p>2.\u5c06GDS\u5de5\u5177\u5305\u4e0a\u4f20\u81f3\u4e0a\u4e00\u6b65\u6240\u521b\u5efa\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n<p>\u4ee5\u4e0a\u4f20redhat\u7248\u672c\u7684\u5de5\u5177\u5305\u4e3a\u4f8b &#xff0c;\u5c06GDS\u5de5\u5177\u5305\u201cdws_client_8.1.x_redhat_x64.zip\u201d\u4e0a\u4f20\u81f3\u4e0a\u4e00\u6b65\u6240\u521b\u5efa\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n<p>3.\u5728\u5de5\u5177\u5305\u6240\u5728\u76ee\u5f55\u4e0b&#xff0c;\u89e3\u538b\u5de5\u5177\u5305\u3002<\/p>\n<p>cd \/opt\/bin\/dws<br \/>\nunzip dws_client_8.1.x_redhat_x64.zip<\/p>\n<p>4.\u521b\u5efa\u7528\u6237gds_user\u53ca\u5176\u6240\u5c5e\u7684\u7528\u6237\u7ec4gdsgrp\u3002\u6b64\u7528\u6237\u7528\u4e8e\u542f\u52a8GDS&#xff0c;\u4e14\u9700\u8981\u62e5\u6709\u8bfb\u53d6\u6570\u636e\u6e90\u6587\u4ef6\u76ee\u5f55\u7684\u6743\u9650\u3002<\/p>\n<p>groupadd gdsgrp<br \/>\nuseradd -g gdsgrp gds_user<\/p>\n<p>5.\u4fee\u6539\u5de5\u5177\u5305\u4ee5\u53ca\u6570\u636e\u6e90\u6587\u4ef6\u76ee\u5f55\u5c5e\u4e3b\u4e3a\u521b\u5efa\u7684\u7528\u6237gds_user\u53ca\u5176\u6240\u5c5e\u7684\u7528\u6237\u7ec4gdsgrp\u3002<\/p>\n<p>chown -R gds_user:gdsgrp \/opt\/bin\/dws\/gds<br \/>\nchown -R gds_user:gdsgrp \/input_data<\/p>\n<p>6.\u5207\u6362\u5230gds_user\u7528\u6237\u3002<\/p>\n<p>su &#8211; gds_user<\/p>\n<p>\u82e5\u5f53\u524d\u96c6\u7fa4\u7248\u672c\u4e3a8.0.x\u53ca\u4ee5\u524d\u7248\u672c&#xff0c;\u8bf7\u8df3\u8fc7\u6b65\u9aa47&#xff0c;\u76f4\u63a5\u6267\u884c\u6b65\u9aa48\u3002<\/p>\n<p>\u82e5\u5f53\u524d\u96c6\u7fa4\u7248\u672c\u4e3a8.1.x\u7248\u672c&#xff0c;\u5219\u6b63\u5e38\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\u3002<\/p>\n<p>7.\u6267\u884c\u73af\u5883\u4f9d\u8d56\u811a\u672c\u3002&#xff08;\u4ec58.1.x\u7248\u672c\u9002\u7528&#xff09;<\/p>\n<p>cd \/opt\/bin\/dws\/gds\/bin<br \/>\nsource gds_env<\/p>\n<p>8.\u542f\u52a8GDS\u3002<\/p>\n<p>\/opt\/bin\/dws\/gds\/bin\/gds -d \/input_data\/ -p 192.168.0.90:5000 -H 10.10.0.1\/24 -l \/opt\/bin\/dws\/gds\/gds_log.txt -D<\/p>\n<p>\u547d\u4ee4\u4e2d\u7684\u659c\u4f53\u90e8\u5206\u8bf7\u6839\u636e\u5b9e\u9645\u586b\u5199\u3002<\/p>\n<ul>\n<li>-d dir &#xff1a;\u4fdd\u5b58\u6709\u5f85\u5bfc\u5165\u6570\u636e\u7684\u6570\u636e\u6587\u4ef6\u6240\u5728\u76ee\u5f55\u3002\u672c\u6559\u7a0b\u4e2d\u4e3a\u201c\/input_data\/\u201d\u3002<\/li>\n<li>-p ip:port &#xff1a;GDS\u76d1\u542cIP\u548c\u76d1\u542c\u7aef\u53e3\u3002\u9ed8\u8ba4\u503c\u4e3a&#xff1a;127.0.0.1&#xff0c;\u9700\u8981\u66ff\u6362\u4e3a\u80fd\u8ddfDWS\u901a\u4fe1\u7684\u4e07\u5146\u7f51IP\u3002\u76d1\u542c\u7aef\u53e3\u7684\u53d6\u503c\u8303\u56f4&#xff1a;1024~65535\u3002\u9ed8\u8ba4\u503c\u4e3a&#xff1a;8098\u3002\u672c\u6559\u7a0b\u914d\u7f6e\u4e3a&#xff1a;192.168.0.90:5000\u3002<\/li>\n<li>-H address_string &#xff1a;\u5141\u8bb8\u54ea\u4e9b\u4e3b\u673a\u8fde\u63a5\u548c\u4f7f\u7528GDS\u670d\u52a1\u3002\u53c2\u6570\u9700\u4e3aCIDR\u683c\u5f0f\u3002\u6b64\u53c2\u6570\u914d\u7f6e\u7684\u76ee\u7684\u662f\u5141\u8bb8DWS\u96c6\u7fa4\u53ef\u4ee5\u8bbf\u95eeGDS\u670d\u52a1\u8fdb\u884c\u6570\u636e\u5bfc\u5165\u3002\u6240\u4ee5\u8bf7\u4fdd\u8bc1\u6240\u914d\u7f6e\u7684\u7f51\u6bb5\u5305\u542bDWS\u96c6\u7fa4\u5404\u4e3b\u673a\u3002<\/li>\n<li>-l log_file &#xff1a;\u5b58\u653eGDS\u7684\u65e5\u5fd7\u6587\u4ef6\u8def\u5f84\u53ca\u6587\u4ef6\u540d\u3002\u672c\u6559\u7a0b\u4e3a\u201c\/opt\/bin\/dws\/gds\/gds_log.txt\u201d\u3002<\/li>\n<li>-D &#xff1a;\u540e\u53f0\u8fd0\u884cGDS\u3002\u4ec5\u652f\u6301Linux\u64cd\u4f5c\u7cfb\u7edf\u4e0b\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<h2 id=\"section-6cd88b73e7d45071\">\u521b\u5efa\u5916\u8868<\/h2>\n<p>1.\u4f7f\u7528SQL\u5ba2\u6237\u7aef\u5de5\u5177\u8fde\u63a5DWS\u6570\u636e\u5e93\u3002<\/p>\n<p>2.\u521b\u5efa\u5982\u4e0b\u5916\u8868&#xff1a;<\/p>\n<p>\u6ce8\u610f<\/p>\n<p>LOCATION&#xff1a;\u8bf7\u66ff\u6362\u6210\u5b9e\u9645\u7684GDS\u5730\u5740\u548c\u7aef\u53e3\u3002<\/p>\n<p>DROP FOREIGN TABLE IF EXISTS product_info_ext;<br \/>\nCREATE FOREIGN TABLE product_info_ext<br \/>\n(<br \/>\n    product_price                integer        not null,<br \/>\n    product_id                   char(30)       not null,<br \/>\n    product_time                 date           ,<br \/>\n    product_level                char(10)       ,<br \/>\n    product_name                 varchar(200)   ,<br \/>\n    product_type1                varchar(20)    ,<br \/>\n    product_type2                char(10)       ,<br \/>\n    product_monthly_sales_cnt    integer        ,<br \/>\n    product_comment_time         date           ,<br \/>\n    product_comment_num          integer        ,<br \/>\n    product_comment_content      varchar(200)<br \/>\n)<br \/>\nSERVER gsmpp_server<br \/>\nOPTIONS(<br \/>\nLOCATION &#039;gsfs:\/\/192.168.0.90:5000\/*&#039;,<br \/>\nFORMAT &#039;CSV&#039; ,<br \/>\nDELIMITER &#039;,&#039;,<br \/>\nENCODING &#039;utf8&#039;,<br \/>\nHEADER &#039;false&#039;,<br \/>\nFILL_MISSING_FIELDS &#039;true&#039;,<br \/>\nIGNORE_EXTRA_DATA &#039;true&#039;<br \/>\n)<br \/>\nREAD ONLY<br \/>\nLOG INTO product_info_err<br \/>\nPER NODE REJECT LIMIT &#039;unlimited&#039;;<\/p>\n<p>\u8fd4\u56de\u5982\u4e0b\u4fe1\u606f\u8868\u793a\u521b\u5efa\u6210\u529f&#xff1a;<\/p>\n<p>CREATE FOREIGN TABLE<\/p>\n<h2 id=\"section-9c6331427eccf227\">\u5bfc\u5165\u6570\u636e<\/h2>\n<p>1.\u4f7f\u7528\u5982\u4e0b\u8bed\u53e5\u5728DWS\u4e2d\u521b\u5efa\u76ee\u6807\u8868product_info&#xff0c;\u7528\u4e8e\u5b58\u50a8\u5bfc\u5165\u7684\u6570\u636e\u3002<\/p>\n<p>DROP TABLE IF EXISTS product_info;<br \/>\nCREATE TABLE product_info<br \/>\n(<br \/>\n    product_price                integer        not null,<br \/>\n    product_id                   char(30)       not null,<br \/>\n    product_time                 date           ,<br \/>\n    product_level                char(10)       ,<br \/>\n    product_name                 varchar(200)   ,<br \/>\n    product_type1                varchar(20)    ,<br \/>\n    product_type2                char(10)       ,<br \/>\n    product_monthly_sales_cnt    integer        ,<br \/>\n    product_comment_time         date           ,<br \/>\n    product_comment_num          integer        ,<br \/>\n    product_comment_content      varchar(200)<br \/>\n)<br \/>\nWITH (<br \/>\norientation &#061; column,<br \/>\ncompression&#061;middle<br \/>\n)<br \/>\nDISTRIBUTE BY hash (product_id);<\/p>\n<p>2.\u5c06\u6570\u636e\u6e90\u6587\u4ef6\u4e2d\u7684\u6570\u636e\u901a\u8fc7\u5916\u8868\u201cproduct_info_ext\u201d\u5bfc\u5165\u5230\u8868\u201cproduct_info\u201d\u4e2d\u3002<\/p>\n<p>INSERT INTO product_info SELECT * FROM product_info_ext ;<\/p>\n<p>\u51fa\u73b0\u4ee5\u4e0b\u4fe1\u606f&#xff0c;\u8bf4\u660e\u6570\u636e\u5bfc\u5165\u6210\u529f\u3002<\/p>\n<p>INSERT 0 20<\/p>\n<p>3.\u6267\u884cSELECT\u547d\u4ee4\u67e5\u8be2\u76ee\u6807\u8868product_info&#xff0c;\u67e5\u770b\u5bfc\u5165\u5230DWS\u4e2d\u7684\u6570\u636e\u3002<\/p>\n<p>SELECT count(*) FROM product_info;<\/p>\n<p>\u67e5\u8be2\u7ed3\u679c\u663e\u793a\u7ed3\u679c\u5982\u4e0b&#xff0c;\u8868\u793a\u5bfc\u5165\u6210\u529f\u3002<\/p>\n<p>count<br \/>\n&#8212;&#8212;-<br \/>\n     20<br \/>\n(1 row)<\/p>\n<p>4.\u5bf9\u8868product_info\u6267\u884cVACUUM FULL\u3002<\/p>\n<p>VACUUM FULL product_info<\/p>\n<p>5.\u66f4\u65b0\u8868product_info\u7684\u7edf\u8ba1\u4fe1\u606f\u3002<\/p>\n<p>ANALYZE product_info;<\/p>\n<h2 id=\"section-74c800859e86a5c1\">\u505c\u6b62GDS<\/h2>\n<p>1.\u4ee5gds_user\u7528\u6237\u767b\u5f55\u5b89\u88c5GDS\u7684\u6570\u636e\u670d\u52a1\u5668\u3002<\/p>\n<p>2.\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u65b9\u5f0f\u505c\u6b62GDS\u3002<\/p>\n<p>a.\u6267\u884c\u5982\u4e0b\u547d\u4ee4&#xff0c;\u67e5\u8be2GDS\u8fdb\u7a0b\u53f7\u3002\u5176\u4e2dGDS\u8fdb\u7a0b\u53f7\u4e3a128954\u3002<\/p>\n<p>ps -ef|grep gds<br \/>\ngds_user 128954      1  0 15:03 ?        00:00:00 gds -d \/input_data\/ -p 192.168.0.90:5000 -l \/opt\/bin\/gds\/gds_log.txt  -D<br \/>\ngds_user 129003 118723  0 15:04 pts\/0    00:00:00 grep gds<\/p>\n<p>b.\u4f7f\u7528\u201ckill\u201d\u547d\u4ee4&#xff0c;\u505c\u6b62GDS\u3002\u5176\u4e2d128954\u4e3a\u4e0a\u4e00\u6b65\u9aa4\u4e2d\u67e5\u8be2\u51fa\u7684GDS\u8fdb\u7a0b\u53f7\u3002<\/p>\n<p>kill -9 128954<\/p>\n<h2 id=\"section-d4ca312eadb4f9c0\">\u6e05\u9664\u8d44\u6e90<\/h2>\n<p>1.\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff0c;\u5220\u9664\u76ee\u6807\u8868product_info\u3002<\/p>\n<p>DROP TABLE product_info;<\/p>\n<p>\u5f53\u7ed3\u679c\u663e\u793a\u4e3a\u5982\u4e0b\u4fe1\u606f&#xff0c;\u5219\u8868\u793a\u5220\u9664\u6210\u529f\u3002<\/p>\n<p>DROP TABLE<\/p>\n<p>2.\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff0c;\u5220\u9664\u5916\u8868product_info_ext\u3002<\/p>\n<p>DROP FOREIGN TABLE product_info_ext;<\/p>\n<p>\u5f53\u7ed3\u679c\u663e\u793a\u4e3a\u5982\u4e0b\u4fe1\u606f&#xff0c;\u5219\u8868\u793a\u5220\u9664\u6210\u529f\u3002<\/p>\n<p>DROP FOREIGN TABLE<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u8981\u4ecb\u7ecd\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e\u7684\u6700\u4f73\u5b9e\u8df5\u3002_gds\u670d\u52a1\u5668<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,44],"topic":[],"class_list":["post-30243","post","type-post","status-publish","format-standard","hentry","category-server","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/30243.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u8981\u4ecb\u7ecd\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e\u7684\u6700\u4f73\u5b9e\u8df5\u3002_gds\u670d\u52a1\u5668\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/30243.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-20T10:06:37+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/30243.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/30243.html\",\"name\":\"\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-20T10:06:37+00:00\",\"dateModified\":\"2025-04-20T10:06:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/30243.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/30243.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/30243.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/30243.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u8981\u4ecb\u7ecd\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e\u7684\u6700\u4f73\u5b9e\u8df5\u3002_gds\u670d\u52a1\u5668","og_url":"https:\/\/www.wsisp.com\/helps\/30243.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-20T10:06:37+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/30243.html","url":"https:\/\/www.wsisp.com\/helps\/30243.html","name":"\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-20T10:06:37+00:00","dateModified":"2025-04-20T10:06:37+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/30243.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/30243.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/30243.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528GDS\u4ece\u8fdc\u7aef\u670d\u52a1\u5668\u5bfc\u5165\u6570\u636e"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/30243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=30243"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/30243\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=30243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=30243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=30243"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=30243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}