{"id":102910,"date":"2020-05-13T13:58:42","date_gmt":"2020-05-13T05:58:42","guid":{"rendered":"http:\/\/4563.org\/?p=102910"},"modified":"2020-05-13T13:58:42","modified_gmt":"2020-05-13T05:58:42","slug":"%e8%a6%81-update-%e4%b8%aa-3000w-%e8%a1%8c%e7%9a%84%e5%a4%a7%e8%a1%a8%e5%81%9a%e6%95%b0%e6%8d%ae-migration%ef%bc%8c%e6%80%8e%e4%b9%88%e6%93%8d%e4%bd%9c%e6%af%94%e8%be%83%e5%a5%bd","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=102910","title":{"rendered":"\u8981 update \u4e2a 3000W \u884c\u7684\u5927\u8868\u505a\u6570\u636e migration\uff0c\u600e\u4e48\u64cd\u4f5c\u6bd4\u8f83\u597d"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8981 update \u4e2a 3000W \u884c\u7684\u5927\u8868\u505a\u6570\u636e migration\uff0c\u600e\u4e48\u64cd\u4f5c\u6bd4\u8f83\u597d               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rockyou12 <\/span>  <span><i><\/i> 53<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6570\u636e\u5e93\u662f postgresql\uff0c\u4ee5\u524d\u7ecf\u7eac\u5ea6\u7528\u7684\u5355\u72ec\u5b57\u6bb5\uff0c\u73b0\u5728\u50cf\u7528 point \u7c7b\u578b\u518d\u52a0 postgis \u505a\u5206\u6790\u3002\u8868\u6709\u4f18\u5316\uff0c\u76f8\u5f53\u4e8e\u505a\u4e86\u8868\u5206\u533a\uff0c\u73b0\u5728 sql \u662f<\/p>\n<pre><code>update t_gps set location = ST_GeomFromText('Point(' || \"lont\" || ' ' || \"lat\" || ')', 4326); create index idx_gps_location on t_gps using gist (\"location\"); <\/code><\/pre>\n<p>\u4f46\u5728\u6d4b\u8bd5\u5e93\u8bd5\u4e86\u4e0b\uff0c\u771f\u7684\u5f88\u6162\u3002\u4e00\u822c\u8fd9\u79cd\u66f4\u65b0\u65b9\u6848\u600e\u4e48\u505a\u6bd4\u8f83\u597d\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"705628\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nandaye <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             create table test as select t_gps.*,ST_GeomFromText(&#8216;Point(&#8216; || &#8220;lont&#8221; || &#8216; &#8216; || &#8220;lat&#8221; || &#8216;)&#8217;, 4326) as location from t_gps;<br \/>drot table t_gps;<br \/>rename test to t_gps;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"705629\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : rockyou12 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @nandaye \u611f\u8c22\uff0c\u601d\u8def\u61c2\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"705630\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dswyzx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @nandaye \u8ddf\u5efa\u7d22\u5f15\u4e00\u4e2a\u5957\u8def\u54c7.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"705631\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : duhui <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             drot table t_gps; \u6539\u6210 rename t_gps to t_gps_bak; \u6bd4\u8f83\u597d\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8981 update \u4e2a 3000W &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/102910"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=102910"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/102910\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=102910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=102910"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=102910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}