{"id":160079,"date":"2024-11-03T20:06:23","date_gmt":"2024-11-03T12:06:23","guid":{"rendered":"https:\/\/server.hk\/cnblog\/160079\/"},"modified":"2024-11-03T20:06:24","modified_gmt":"2024-11-03T12:06:24","slug":"oceanbase-%e6%95%99%e7%a8%8b%ef%bc%9aoceanbase-clob-%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/160079\/","title":{"rendered":"OceanBase \u6559\u7a0b\uff1aOceanBase CLOB \u6578\u64da\u985e\u578b"},"content":{"rendered":"<h1 id=\"oceanbase-%e6%95%99%e7%a8%8b%ef%bc%9aoceanbase-clob-%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b-lCXPsOKIIZ\">OceanBase \u6559\u7a0b\uff1aOceanBase CLOB \u6578\u64da\u985e\u578b<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u5eab\u7684\u9078\u64c7\u5c0d\u65bc\u61c9\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\u548c\u53ef\u64f4\u5c55\u6027\u81f3\u95dc\u91cd\u8981\u3002OceanBase \u4f5c\u70ba\u4e00\u6b3e\u9ad8\u6027\u80fd\u7684\u5206\u4f48\u5f0f\u6578\u64da\u5eab\uff0c\u8d8a\u4f86\u8d8a\u53d7\u5230\u958b\u767c\u8005\u7684\u9752\u775e\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e OceanBase \u4e2d\u7684 CLOB\uff08Character Large Object\uff09\u6578\u64da\u985e\u578b\uff0c\u4e26\u63d0\u4f9b\u76f8\u95dc\u7684\u4f7f\u7528\u793a\u4f8b\u548c\u6700\u4f73\u5be6\u8e10\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af-clob-%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%ef%bc%9f-lCXPsOKIIZ\">\u4ec0\u9ebc\u662f CLOB \u6578\u64da\u985e\u578b\uff1f<\/h2>\n<p>CLOB\uff08Character Large Object\uff09\u662f\u4e00\u7a2e\u7528\u65bc\u5b58\u5132\u5927\u91cf\u6587\u672c\u6578\u64da\u7684\u6578\u64da\u985e\u578b\u3002\u8207\u666e\u901a\u7684\u5b57\u7b26\u4e32\u985e\u578b\u76f8\u6bd4\uff0cCLOB \u53ef\u4ee5\u5b58\u5132\u66f4\u5927\u5bb9\u91cf\u7684\u6587\u672c\uff0c\u901a\u5e38\u7528\u65bc\u5b58\u5132\u6587\u6a94\u3001\u6587\u7ae0\u3001\u65e5\u8a8c\u7b49\u9577\u6587\u672c\u6578\u64da\u3002\u5728 OceanBase \u4e2d\uff0cCLOB \u6578\u64da\u985e\u578b\u7684\u8a2d\u8a08\u65e8\u5728\u652f\u6301\u9ad8\u6548\u7684\u6587\u672c\u8655\u7406\u548c\u67e5\u8a62\u3002<\/p>\n<h2 id=\"oceanbase-%e4%b8%ad%e7%9a%84-clob-%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e7%89%b9%e6%80%a7-lCXPsOKIIZ\">OceanBase \u4e2d\u7684 CLOB \u6578\u64da\u985e\u578b\u7279\u6027<\/h2>\n<ul>\n<li><strong>\u5bb9\u91cf\u5927\uff1a<\/strong> CLOB \u53ef\u4ee5\u5b58\u5132\u7684\u6578\u64da\u91cf\u901a\u5e38\u9054\u5230 4GB\uff0c\u9019\u4f7f\u5f97\u5b83\u975e\u5e38\u9069\u5408\u5b58\u5132\u5927\u578b\u6587\u672c\u3002<\/li>\n<li><strong>\u652f\u6301\u591a\u7a2e\u5b57\u7b26\u96c6\uff1a<\/strong> OceanBase \u652f\u6301\u591a\u7a2e\u5b57\u7b26\u96c6\uff0c\u9019\u610f\u5473\u8457 CLOB \u53ef\u4ee5\u5b58\u5132\u5404\u7a2e\u8a9e\u8a00\u7684\u6587\u672c\u6578\u64da\u3002<\/li>\n<li><strong>\u9ad8\u6548\u67e5\u8a62\uff1a<\/strong> OceanBase \u7684\u67e5\u8a62\u5f15\u64ce\u512a\u5316\u4e86\u5c0d CLOB \u6578\u64da\u7684\u67e5\u8a62\u6027\u80fd\uff0c\u80fd\u5920\u5feb\u901f\u6aa2\u7d22\u548c\u8655\u7406\u5927\u91cf\u6587\u672c\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e5%9c%a8-oceanbase-%e4%b8%ad%e4%bd%bf%e7%94%a8-clob-%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b-lCXPsOKIIZ\">\u5982\u4f55\u5728 OceanBase \u4e2d\u4f7f\u7528 CLOB \u6578\u64da\u985e\u578b<\/h2>\n<p>\u5728 OceanBase \u4e2d\u5275\u5efa\u4e00\u500b\u5305\u542b CLOB \u6578\u64da\u985e\u578b\u7684\u8868\u975e\u5e38\u7c21\u55ae\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u793a\u4f8b SQL \u8a9e\u53e5\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u5275\u5efa\u4e00\u500b\u5305\u542b CLOB \u5217\u7684\u8868\uff1a<\/p>\n<pre><code>CREATE TABLE articles (\n    id INT PRIMARY KEY,\n    title VARCHAR(255),\n    content CLOB\n);<\/code><\/pre>\n<p>\u5728\u9019\u500b\u793a\u4f8b\u4e2d\uff0c\u6211\u5011\u5275\u5efa\u4e86\u4e00\u500b\u540d\u70ba <code>articles<\/code> \u7684\u8868\uff0c\u8a72\u8868\u5305\u542b\u4e09\u500b\u5217\uff1a<code>id<\/code>\u3001<code>title<\/code> \u548c <code>content<\/code>\u3002\u5176\u4e2d\uff0c<code>content<\/code> \u5217\u4f7f\u7528\u4e86 CLOB \u6578\u64da\u985e\u578b\uff0c\u4ee5\u4fbf\u5b58\u5132\u9577\u6587\u672c\u5167\u5bb9\u3002<\/p>\n<h2 id=\"%e6%8f%92%e5%85%a5%e5%92%8c%e6%9f%a5%e8%a9%a2-clob-%e6%95%b8%e6%93%9a-lCXPsOKIIZ\">\u63d2\u5165\u548c\u67e5\u8a62 CLOB \u6578\u64da<\/h2>\n<p>\u63d2\u5165 CLOB \u6578\u64da\u6642\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>INSERT<\/code> \u8a9e\u53e5\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u63d2\u5165\u793a\u4f8b\uff1a<\/p>\n<pre><code>INSERT INTO articles (id, title, content) VALUES (1, 'OceanBase \u6559\u7a0b', '\u9019\u662f\u4e00\u7bc7\u95dc\u65bc OceanBase \u7684\u8a73\u7d30\u6559\u7a0b\uff0c\u5167\u5bb9\u5305\u62ec CLOB \u6578\u64da\u985e\u578b\u7684\u4f7f\u7528\u3002');<\/code><\/pre>\n<p>\u67e5\u8a62 CLOB \u6578\u64da\u4e5f\u5f88\u7c21\u55ae\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>SELECT<\/code> \u8a9e\u53e5\uff1a<\/p>\n<pre><code>SELECT title, content FROM articles WHERE id = 1;<\/code><\/pre>\n<p>\u9019\u5c07\u8fd4\u56de\u6307\u5b9a ID \u7684\u6587\u7ae0\u6a19\u984c\u548c\u5167\u5bb9\u3002<\/p>\n<h2 id=\"%e6%9c%80%e4%bd%b3%e5%af%a6%e8%b8%90-lCXPsOKIIZ\">\u6700\u4f73\u5be6\u8e10<\/h2>\n<ul>\n<li><strong>\u907f\u514d\u904e\u5ea6\u4f7f\u7528\uff1a<\/strong> \u96d6\u7136 CLOB \u53ef\u4ee5\u5b58\u5132\u5927\u91cf\u6578\u64da\uff0c\u4f46\u5728\u4e0d\u5fc5\u8981\u7684\u60c5\u6cc1\u4e0b\u61c9\u907f\u514d\u4f7f\u7528\uff0c\u4ee5\u514d\u5f71\u97ff\u6027\u80fd\u3002<\/li>\n<li><strong>\u5206\u6bb5\u8655\u7406\uff1a<\/strong> \u5c0d\u65bc\u7279\u5225\u5927\u7684\u6587\u672c\u6578\u64da\uff0c\u53ef\u4ee5\u8003\u616e\u5c07\u5176\u5206\u6bb5\u5b58\u5132\uff0c\u4ee5\u63d0\u9ad8\u67e5\u8a62\u6548\u7387\u3002<\/li>\n<li><strong>\u5b9a\u671f\u6e05\u7406\uff1a<\/strong> \u5b9a\u671f\u6aa2\u67e5\u548c\u6e05\u7406\u4e0d\u518d\u9700\u8981\u7684 CLOB \u6578\u64da\uff0c\u4ee5\u91cb\u653e\u5b58\u5132\u7a7a\u9593\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-lCXPsOKIIZ\">\u7e3d\u7d50<\/h2>\n<p>OceanBase \u7684 CLOB \u6578\u64da\u985e\u578b\u70ba\u958b\u767c\u8005\u63d0\u4f9b\u4e86\u4e00\u7a2e\u9ad8\u6548\u5b58\u5132\u548c\u8655\u7406\u5927\u91cf\u6587\u672c\u6578\u64da\u7684\u89e3\u6c7a\u65b9\u6848\u3002\u901a\u904e\u5408\u7406\u4f7f\u7528 CLOB\uff0c\u958b\u767c\u8005\u53ef\u4ee5\u5728\u61c9\u7528\u7a0b\u5e8f\u4e2d\u5be6\u73fe\u66f4\u597d\u7684\u6027\u80fd\u548c\u53ef\u64f4\u5c55\u6027\u3002\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4f86\u652f\u6301\u60a8\u7684 OceanBase \u61c9\u7528\uff0cServer.HK \u63d0\u4f9b\u4e86\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u4e0d\u540c\u9700\u6c42\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u670d\u52d9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22 OceanBase \u6559\u7a0b\uff0c\u6df1\u5165\u4e86\u89e3 CLOB \u6578\u64da\u985e\u578b\u7684\u7279\u6027\u8207\u61c9\u7528\uff0c\u63d0\u5347\u6578\u64da\u7ba1\u7406\u6548\u7387\uff0c\u52a9\u529b\u958b\u767c\u8005\u5be6\u73fe\u6700\u4f73\u6027\u80fd\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-160079","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/160079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=160079"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/160079\/revisions"}],"predecessor-version":[{"id":160080,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/160079\/revisions\/160080"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=160079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=160079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=160079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}