{"id":193289,"date":"2024-11-12T20:56:32","date_gmt":"2024-11-12T12:56:32","guid":{"rendered":"https:\/\/server.hk\/cnblog\/193289\/"},"modified":"2024-11-12T20:56:34","modified_gmt":"2024-11-12T12:56:34","slug":"%e4%bf%ae%e6%94%b9%e6%95%b8%e6%93%9a%e5%ba%ab%e8%a1%a8%e7%9a%84%e6%99%82%e9%96%93%e6%9f%a5%e7%9c%8b%e6%96%b9%e6%b3%95-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%87%8c%e6%9f%a5%e7%9c%8b%e6%89%80%e6%9c%89%e7%9a%84","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/193289\/","title":{"rendered":"\u4fee\u6539\u6578\u64da\u5eab\u8868\u7684\u6642\u9593\u67e5\u770b\u65b9\u6cd5 (\u6578\u64da\u5eab\u91cc\u67e5\u770b\u6240\u6709\u7684\u8868\u600e\u9ebc\u4fee\u6539\u6642\u9593)"},"content":{"rendered":"<h1 id=\"%e4%bf%ae%e6%94%b9%e6%95%b8%e6%93%9a%e5%ba%ab%e8%a1%a8%e7%9a%84%e6%99%82%e9%96%93%e6%9f%a5%e7%9c%8b%e6%96%b9%e6%b3%95-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%87%8c%e6%9f%a5%e7%9c%8b%e6%89%80%e6%9c%89%e7%9a%84-YPETNhGLVV\">\u4fee\u6539\u6578\u64da\u5eab\u8868\u7684\u6642\u9593\u67e5\u770b\u65b9\u6cd5 (\u6578\u64da\u5eab\u91cc\u67e5\u770b\u6240\u6709\u7684\u8868\u600e\u9ebc\u4fee\u6539\u6642\u9593)<\/h1>\n<p>\u5728\u6578\u64da\u5eab\u7ba1\u7406\u4e2d\uff0c\u4e86\u89e3\u8868\u7684\u4fee\u6539\u6642\u9593\u5c0d\u65bc\u6578\u64da\u7684\u8ffd\u8e64\u548c\u7ba1\u7406\u81f3\u95dc\u91cd\u8981\u3002\u7121\u8ad6\u662f\u70ba\u4e86\u6578\u64da\u7684\u5b8c\u6574\u6027\uff0c\u9084\u662f\u70ba\u4e86\u9032\u884c\u6545\u969c\u6392\u67e5\uff0c\u80fd\u5920\u67e5\u770b\u548c\u4fee\u6539\u6578\u64da\u5eab\u8868\u7684\u6642\u9593\u4fe1\u606f\u90fd\u662f\u4e00\u9805\u57fa\u672c\u6280\u80fd\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728\u6578\u64da\u5eab\u4e2d\u67e5\u770b\u6240\u6709\u8868\u7684\u4fee\u6539\u6642\u9593\uff0c\u4e26\u63d0\u4f9b\u4e00\u4e9b\u5be6\u7528\u7684\u793a\u4f8b\u548c\u4ee3\u78bc\u7247\u6bb5\u3002<\/p>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e8%a1%a8%e7%9a%84%e7%b5%90%e6%a7%8b-YPETNhGLVV\">\u6578\u64da\u5eab\u8868\u7684\u7d50\u69cb<\/h2>\n<p>\u5728\u958b\u59cb\u4e4b\u524d\uff0c\u6211\u5011\u9700\u8981\u4e86\u89e3\u6578\u64da\u5eab\u8868\u7684\u57fa\u672c\u7d50\u69cb\u3002\u6bcf\u500b\u6578\u64da\u5eab\u8868\u901a\u5e38\u5305\u542b\u591a\u500b\u5b57\u6bb5\uff0c\u9019\u4e9b\u5b57\u6bb5\u7528\u65bc\u5b58\u5132\u4e0d\u540c\u985e\u578b\u7684\u6578\u64da\u3002\u9664\u4e86\u6578\u64da\u5b57\u6bb5\u5916\uff0c\u6578\u64da\u5eab\u7cfb\u7d71\u9084\u6703\u5b58\u5132\u4e00\u4e9b\u5143\u6578\u64da\uff0c\u5305\u62ec\u8868\u7684\u5275\u5efa\u6642\u9593\u548c\u4fee\u6539\u6642\u9593\u7b49\u4fe1\u606f\u3002<\/p>\n<h2 id=\"%e6%9f%a5%e7%9c%8b%e6%95%b8%e6%93%9a%e5%ba%ab%e8%a1%a8%e7%9a%84%e4%bf%ae%e6%94%b9%e6%99%82%e9%96%93-YPETNhGLVV\">\u67e5\u770b\u6578\u64da\u5eab\u8868\u7684\u4fee\u6539\u6642\u9593<\/h2>\n<p>\u4e0d\u540c\u7684\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff08DBMS\uff09\u63d0\u4f9b\u4e86\u4e0d\u540c\u7684\u65b9\u6cd5\u4f86\u67e5\u770b\u8868\u7684\u4fee\u6539\u6642\u9593\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u6578\u64da\u5eab\u7cfb\u7d71\u53ca\u5176\u67e5\u770b\u8868\u4fee\u6539\u6642\u9593\u7684\u65b9\u6cd5\uff1a<\/p>\n<h3 id=\"mysql-YPETNhGLVV\">MySQL<\/h3>\n<p>\u5728MySQL\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u67e5\u8a62\u4f86\u67e5\u770b\u6240\u6709\u8868\u7684\u4fee\u6539\u6642\u9593\uff1a<\/p>\n<pre><code>SELECT \n    table_name, \n    update_time \nFROM \n    information_schema.tables \nWHERE \n    table_schema = '\u4f60\u7684\u6578\u64da\u5eab\u540d';<\/code><\/pre>\n<p>\u9019\u500b\u67e5\u8a62\u5c07\u8fd4\u56de\u6307\u5b9a\u6578\u64da\u5eab\u4e2d\u6240\u6709\u8868\u7684\u540d\u7a31\u53ca\u5176\u6700\u5f8c\u4fee\u6539\u6642\u9593\u3002\u8acb\u5c07\u201c\u4f60\u7684\u6578\u64da\u5eab\u540d\u201d\u66ff\u63db\u70ba\u5be6\u969b\u7684\u6578\u64da\u5eab\u540d\u7a31\u3002<\/p>\n<h3 id=\"postgresql-YPETNhGLVV\">PostgreSQL<\/h3>\n<p>\u5728PostgreSQL\u4e2d\uff0c\u8868\u7684\u4fee\u6539\u6642\u9593\u4e26\u4e0d\u76f4\u63a5\u5b58\u5132\uff0c\u4f46\u53ef\u4ee5\u901a\u904e\u67e5\u8a62\u7cfb\u7d71\u76ee\u9304\u4f86\u7372\u53d6\u76f8\u95dc\u4fe1\u606f\uff1a<\/p>\n<pre><code>SELECT \n    relname AS table_name, \n    pg_last_update(relid) AS last_update \nFROM \n    pg_stat_all_tables \nWHERE \n    schemaname = 'public';<\/code><\/pre>\n<p>\u9019\u500b\u67e5\u8a62\u5c07\u8fd4\u56de\u6240\u6709\u516c\u5171\u6a21\u5f0f\u4e0b\u8868\u7684\u540d\u7a31\u53ca\u5176\u6700\u5f8c\u66f4\u65b0\u7684\u6642\u9593\u3002<\/p>\n<h3 id=\"sql-server-YPETNhGLVV\">SQL Server<\/h3>\n<p>\u5728SQL Server\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u67e5\u8a62\u4f86\u67e5\u770b\u8868\u7684\u4fee\u6539\u6642\u9593\uff1a<\/p>\n<pre><code>SELECT \n    name AS table_name, \n    modify_date \nFROM \n    sys.tables;<\/code><\/pre>\n<p>\u9019\u5c07\u8fd4\u56de\u6240\u6709\u8868\u7684\u540d\u7a31\u53ca\u5176\u6700\u5f8c\u4fee\u6539\u7684\u65e5\u671f\u548c\u6642\u9593\u3002<\/p>\n<h2 id=\"%e4%bf%ae%e6%94%b9%e6%95%b8%e6%93%9a%e5%ba%ab%e8%a1%a8%e7%9a%84%e6%99%82%e9%96%93-YPETNhGLVV\">\u4fee\u6539\u6578\u64da\u5eab\u8868\u7684\u6642\u9593<\/h2>\n<p>\u5728\u5927\u591a\u6578\u60c5\u6cc1\u4e0b\uff0c\u6578\u64da\u5eab\u8868\u7684\u4fee\u6539\u6642\u9593\u662f\u7531\u6578\u64da\u5eab\u7cfb\u7d71\u81ea\u52d5\u7ba1\u7406\u7684\uff0c\u7121\u6cd5\u624b\u52d5\u66f4\u6539\u3002\u7136\u800c\uff0c\u60a8\u53ef\u4ee5\u901a\u904e\u63d2\u5165\u6216\u66f4\u65b0\u6578\u64da\u4f86\u9593\u63a5\u5f71\u97ff\u8868\u7684\u4fee\u6539\u6642\u9593\u3002\u4f8b\u5982\uff0c\u5728MySQL\u4e2d\uff0c\u7576\u60a8\u5c0d\u8868\u9032\u884c\u4efb\u4f55\u63d2\u5165\u6216\u66f4\u65b0\u64cd\u4f5c\u6642\uff0c\u8a72\u8868\u7684\u4fee\u6539\u6642\u9593\u5c07\u81ea\u52d5\u66f4\u65b0\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-YPETNhGLVV\">\u7d50\u8ad6<\/h2>\n<p>\u4e86\u89e3\u5982\u4f55\u67e5\u770b\u548c\u7ba1\u7406\u6578\u64da\u5eab\u8868\u7684\u4fee\u6539\u6642\u9593\u5c0d\u65bc\u6578\u64da\u5eab\u7ba1\u7406\u8005\u4f86\u8aaa\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u7121\u8ad6\u662f\u4f7f\u7528MySQL\u3001PostgreSQL\u9084\u662fSQL Server\uff0c\u638c\u63e1\u9019\u4e9b\u57fa\u672c\u67e5\u8a62\u90fd\u80fd\u5e6b\u52a9\u60a8\u66f4\u597d\u5730\u7ba1\u7406\u6578\u64da\u5eab\u3002\u96a8\u8457\u6578\u64da\u91cf\u7684\u589e\u9577\uff0c\u80fd\u5920\u6709\u6548\u5730\u8ffd\u8e64\u6578\u64da\u7684\u8b8a\u66f4\u5c07\u6709\u52a9\u65bc\u63d0\u9ad8\u6578\u64da\u7684\u53ef\u9760\u6027\u548c\u5b8c\u6574\u6027\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684\u6578\u64da\u5eab\u89e3\u6c7a\u65b9\u6848\uff0c\u8003\u616e\u4f7f\u7528<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u670d\u52d9\uff0c\u9019\u5c07\u70ba\u60a8\u7684\u6578\u64da\u5eab\u7ba1\u7406\u63d0\u4f9b\u7a69\u5b9a\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u5982\u4f55\u5728\u6578\u64da\u5eab\u4e2d\u67e5\u770b\u6240\u6709\u8868\u7684\u4fee\u6539\u6642\u9593\uff0c\u638c\u63e1\u6709\u6548\u7684\u6642\u9593\u67e5\u8a62\u65b9\u6cd5\uff0c\u63d0\u5347\u6578\u64da\u7ba1\u7406\u6548\u7387\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-193289","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/193289","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=193289"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/193289\/revisions"}],"predecessor-version":[{"id":193290,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/193289\/revisions\/193290"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=193289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=193289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=193289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}