{"id":1303,"date":"2015-09-13T22:10:41","date_gmt":"2015-09-13T14:10:41","guid":{"rendered":"http:\/\/coderbee.net\/?p=1303"},"modified":"2015-09-13T22:12:36","modified_gmt":"2015-09-13T14:12:36","slug":"%e9%9a%90%e5%bc%8f%e7%b1%bb%e5%9e%8b%e8%bd%ac%e6%8d%a2%e5%af%bc%e8%87%b4%e5%85%a8%e8%a1%a8%e6%89%ab%e6%8f%8f","status":"publish","type":"post","link":"https:\/\/coderbee.net\/index.php\/java\/20150913\/1303","title":{"rendered":"\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362\u5bfc\u81f4\u5168\u8868\u626b\u63cf"},"content":{"rendered":"<p>\u6700\u8fd1\u7cfb\u7edf\u6539\u7248\u4e86\u4e00\u90e8\u5206\uff08\u5176\u5b9e\u5c31\u662f\u91cd\u505a\u3002\u3002\u3002\uff09\uff0c\u4e0a\u7ebf\u4e4b\u540e\u53c8\u5f00\u59cb\u51fa\u73b0\u6570\u636e\u5e93 IO \u544a\u8b66\u4e86\u3002<\/p>\n<p>DBA \u6293\u51fa\u4e00\u4e2a\u5168\u8868\u626b\u63cf\u7684 SQL\uff0c\u662f\u628a\u8303\u56f4\u5728\u4e24\u4e2a\u949f\u5185\u7684\u6570\u636e\u627e\u51fa\u6765\u505a\u66f4\u65b0\u7684\uff0c\u8fd9\u4e2a\u67e5\u8be2\u7684\u65f6\u95f4\u5b57\u6bb5\u662f\u6709\u7d22\u5f15\u7684\uff0c\u7ed3\u679c\u5374\u6ca1\u6709\u7528\u4e0a\uff0c<br \/>\n\u8ddf\u53e6\u4e00\u4e2a\u8868\u5173\u8054\u7684\u65f6\u5019\uff0c\u5173\u8054\u5b57\u6bb5\u4e5f\u662f\u6709\u7d22\u5f15\u7684\uff0c\u4f46\u8fd8\u662f\u6ca1\u6709\u7528\u4e0a\u3002<\/p>\n<p>\u5728\u4e24\u4e2a\u949f\u5185\u7684\u6570\u636e\u91cf\u5e94\u8be5\u662f\u5f88\u5c0f\u7684\uff0c\u76f8\u5bf9\u4e8e\u603b\u91cf\u6765\u8bf4\uff0c\u65f6\u95f4\u5b57\u6bb5\u7684\u7d22\u5f15\u6ca1\u7406\u7531\u4e0d\u7528\u554a\uff1b\u4ece\u4e3b\u8868\u627e\u51fa\u6765\u7684\u6570\u636e\u91cf\u4e0d\u5927\uff0c\u518d\u53bb\u5173\u8054\u8868\u67e5\u8be2\u4e5f\u5e94\u8be5\u8d70\u7d22\u5f15\u7684\u3002<br \/>\n\u611f\u89c9\u5c31\u662f\u6267\u884c\u8ba1\u5212\u4e0d\u5bf9\u4e86\uff0c\u53bb\u627e DBA \u505a\u56fa\u5316\u3002<\/p>\n<p>\u627e DBA \u5148\u7528 hint \u751f\u6210\u4e00\u4e2a\u8d70\u7d22\u5f15\u7684\u6267\u884c\u8ba1\u5212\uff0c\u7136\u540e\u505a\u4e86\u56fa\u5316\u3002<\/p>\n<p>\u8fd9\u4e2a SQL \u662f\u4e24\u4e2a\u949f\u624d\u6267\u884c\u4e00\u6b21\u7684\uff0c\u7ed3\u679c\u56fa\u5316\u4e4b\u540e\u503c\u73ed DBA \u8bf4\u4e3b\u8868\u8fd8\u662f\u5168\u8868\u626b\u63cf\u3002\u627e DBA \u518d\u505a\u4e00\u6b21\u56fa\u5316\uff0c\u8fd8\u662f\u4e3b\u8868\u5168\u8868\u626b\u63cf\u3002\u6700\u540e\u5f00\u4e86 tunning \uff0c\u63d0\u793a\u8bf4\u6709\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362\uff0c\u4e3b\u8868\u6ca1\u6cd5\u8d70\u7d22\u5f15\u3002<\/p>\n<p>\u5927\u81f4\u626b\u4e86\u4e00\u4e0b\u4ee3\u7801\uff0cJava \u91cc\u7528\u7684\u6570\u636e\u7c7b\u578b\u662f Date \u7684\uff0c\u800c\u8868\u7684\u5217\u7684\u7c7b\u578b\u4e5f\u662f Date\uff0c\u5e94\u8be5\u4e0d\u9700\u8981\u505a\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362\u554a\u3002<\/p>\n<p>\u95ee\u9898\u51fa\u5728 MyBatis \u7684\u53c2\u6570\u7c7b\u578b\u6307\u5b9a\u4e3a timestamp \u800c\u4e0d\u662f Date\uff1b\u7531\u4e8e\u67e5\u8be2\u9700\u8981\u65f6\u5206\u79d2\uff0c\u800c Date \u4f1a\u62b9\u53bb\u8fd9\u4e9b\u503c\uff0c\u6240\u4ee5\u88ab\u6307\u5b9a\u4e3a timestamp\uff0c<br \/>\n\u800c\u8fd9\u4e2a\u7c7b\u578b\u521a\u597d\u5bf9\u5e94\u5230 Oracle \u7684 timestamp \u7c7b\u578b\uff0c\u6240\u4ee5\u5c31\u51fa\u73b0\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362\u3002<\/p>\n<p>\u7ec6\u8282\u5436\u3002\u3002\u3002<\/p>\n<hr\/>\n<p>\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u5fae\u4fe1\u516c\u4f17\u53f7: <strong>coderbee\u7b14\u8bb0<\/strong>\uff0c\u53ef\u4ee5\u66f4\u53ca\u65f6\u56de\u590d\u4f60\u7684\u8ba8\u8bba\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"258\" height=\"258\" src=\"https:\/\/coderbee.net\/wp-content\/uploads\/2019\/01\/coderbee-note.jpg\" class=\"alignnone size-full wp-image-1707\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u7cfb\u7edf\u6539\u7248\u4e86\u4e00\u90e8\u5206\uff08\u5176\u5b9e\u5c31\u662f\u91cd\u505a\u3002\u3002\u3002\uff09\uff0c\u4e0a\u7ebf\u4e4b\u540e\u53c8\u5f00\u59cb\u51fa\u73b0\u6570\u636e\u5e93 IO \u544a\u8b66 &hellip; <a href=\"https:\/\/coderbee.net\/index.php\/java\/20150913\/1303\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[228,99,240],"_links":{"self":[{"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/posts\/1303"}],"collection":[{"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/comments?post=1303"}],"version-history":[{"count":6,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/posts\/1303\/revisions"}],"predecessor-version":[{"id":1309,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/posts\/1303\/revisions\/1309"}],"wp:attachment":[{"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/media?parent=1303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/categories?post=1303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coderbee.net\/index.php\/wp-json\/wp\/v2\/tags?post=1303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}