{"id":5338,"date":"2022-04-10T12:53:11","date_gmt":"2022-04-10T04:53:11","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=5338"},"modified":"2022-04-10T12:53:11","modified_gmt":"2022-04-10T04:53:11","slug":"%e9%9d%a2%e8%af%95%e5%ae%98%ef%bc%9a%e5%a6%82%e4%bd%95%e5%bf%ab%e9%80%9f%e7%9a%84-drop-%e6%8e%89%e4%b8%80%e4%b8%aa-100g-%e7%9a%84%e5%a4%a7%e8%a1%a8%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=5338","title":{"rendered":"\u9762\u8bd5\u5b98\uff1a\u5982\u4f55\u5feb\u901f\u7684 drop \u6389\u4e00\u4e2a 100G \u7684\u5927\u8868\uff01"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u9762\u8bd5\u5b98\uff1a\u5982\u4f55\u5feb\u901f\u7684 drop \u6389\u4e00\u4e2a 100G \u7684\u5927\u8868\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u522b\u770b drop \u547d\u4ee4\u5f88\u7b80\u5355\uff0c\u4f46\u662f\u5f53\u6267\u884c\u65f6\u673a\u4e0d\u5bf9\uff0c\u6267\u884c\u59ff\u52bf\u4e0d\u5bf9\uff0c\u53ef\u80fd\u4f1a\u5f15\u53d1\u201c\u5927\u7978\u201d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u8fd1\u5fae\u4fe1\u7fa4\u91cc\u7684\u4e00\u4f4d\u7f51\u53cb\u5c31\u201c\u5f15\u706b\u4e0a\u8eab\u201d\u4e86\uff0c\u800c\u5176\u4ed6\u7fa4\u53cb\u5219\u201c\u56e0\u7978\u5f97\u798f\u201d\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8b\u60c5\u7684\u8d77\u56e0\u662f\u8fd9\u6837\u7684\uff0c\u4e00\u4f4d\u7f51\u53cb\u53d1\u73b0\u6d4b\u8bd5\u670d\u52a1\u5668\u4e0a\u7684\u4e00\u4e2a log \u8868\u8fbe\u5230\u4e86 100G\u3002\u4ed6\u60f3\u8fd9\u4e2a\u8868\u592a\u5927\u4e86\uff0c\u800c\u4e14\u6d4b\u8bd5\u73af\u5883\u7684 log \u6570\u636e\uff0c\u6ca1\u5565\u7528\u3002\u5c31\u60f3\u7740\u7ed9 delete \u6389\u3002\u4e00\u5f00\u59cb\uff0c\u4ed6\u5c31\u76f4\u63a5\u6267\u884c delete\uff0c\u53d1\u73b0\uff0c\u6267\u884c\u4e86\u534a\u5929\uff0c\u6ca1\u53cd\u5e94\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>delete\u00a0from\u00a0log;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8e\u662f\uff0c\u4ed6\u5c31\u4ece Navicat \u4e0a\uff0c\u5f3a\u5236\u7ed3\u675f\u4e86\u6267\u884c\u3002\u9009\u62e9\u4f7f\u7528 drop \u8fdb\u884c\u6267\u884c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>drop\u00a0table\u00a0log;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c drop \u547d\u4ee4\u540e\uff0c\u53d1\u73b0\u82b1\u4e86\u66f4\u4e45\u7684\u65f6\u95f4\uff0c\u547d\u4ee4\u8fd8\u662f\u6ca1\u8fd4\u56de\u6267\u884c\u6210\u529f\u3002\u4ed6\u5c31\u614c\u4e86\uff0c\u66f4\u8981\u547d\u7684\u662f\uff0c\u8fd9\u4e2a\u65f6\u5019\uff0c\u5404\u4e2a\u4e1a\u52a1\u7ebf\u7684\u4eba\uff0c\u90fd\u5728\u53cd\u9988\uff0c\u6d4b\u8bd5\u73af\u5883\u5f88\u5361\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\uff0c\u4ed6\u53ea\u597d\u5766\u767d\u4ece\u5bbd\uff0c\u53bb\u548c\u9886\u5bfc\u548c dba \u53cd\u9988\u95ee\u9898\u4e86\u3002\u81f3\u4e8e\u6700\u540e\u7684\u7ed3\u5c40\uff0c\u6211\u4eec\u5c31\u4e0d\u7ec6\u8bf4\u4e86\u3002\u5305\u62ec\u4ed6\u4eec\u7684\u4e1a\u52a1\u548c\u5404\u4e1a\u52a1\u7ebf\u7684\u67b6\u6784\u8bbe\u8ba1\u4e5f\u4e0d\u5728\u672c\u6587\u7684\u8ba8\u8bba\u8303\u7574\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u4eca\u5929\uff0c\u91cd\u5927\u8bf4\u662f\uff0cdrop \u4e00\u5f20\u8868\u7684\u65f6\u5019\uff0cMySQL \u7684\u5e95\u5c42\u90fd\u5e72\u4e86\u4e9b\u4ec0\u4e48\uff1f\u4ee5\u53ca\u5b83\u4e3a\u4ec0\u4e48\u4f1a\u6162\uff0c\u5982\u4f55\u5feb\u901f\u7684\u8fdb\u884c\u4e00\u5f20\u8868\u7684 drop\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u9ad8\u6027\u80fd MySQL \u4e00\u4e66\u4e2d\uff0c\u6211\u4eec\u5f97\u51fa\uff0cMySQL \u7684 drop \u547d\u4ee4\uff0c\u4e3b\u8981\u5e72\u4e86\u4e24\u4ef6\u4e8b\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u6e05\u9664 Buffer Pool \u7f13\u51b2<\/li><li>\u5220\u9664\u5bf9\u5e94\u7684\u78c1\u76d8\u6570\u636e\u6587\u4ef6 ibd<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u9488\u5bf9\u7b2c\u4e00\u70b9\uff0c\u5f53\u6211\u4eec\u7684 Buffer Pool \u7f13\u51b2\u8bbe\u7f6e\u7684\u8d8a\u5927\uff0cdrop \u65f6\u5c31\u8d8a\u8017\u65f6\uff0c\u56e0\u6b64\u5408\u7406\u7684 Buffer Pool \u7f13\u51b2\u533a\u8bbe\u7f6e\u5c31\u663e\u5f97\u5f88\u91cd\u8981\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e8c\u70b9\uff0c\u5c24\u5176\u91cd\u8981\u3002\u56e0\u4e3a\u5b83\u662f\u771f\u6b63\u5b58\u6570\u636e\u7684\u6587\u4ef6\u3002drop \u6570\u636e\u6162\uff0c\u6700\u5927\u7684\u539f\u56e0\uff0c\u5c31\u662f\u548c\u5b83\u6709\u5173\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u6211\u4eec\u5220\u9664\u7269\u7406\u6570\u636e\u6587\u4ef6\u65f6\uff0c\u5982\u679c\u6570\u636e\u6587\u4ef6\u8fc7\u5927\uff0c\u5220\u9664\u8fc7\u7a0b\u4f1a\u4ea7\u751f\u5927\u91cf\u7684 IO \u5e76\u8017\u8d39\u66f4\u591a\u7684\u65f6\u95f4\uff0c\u9020\u6210\u78c1\u76d8 IO \u5f00\u9500\u98d9\u5347\uff0cCPU \u8d1f\u8f7d\u8fc7\u9ad8\uff0c\u5f71\u54cd\u5176\u4ed6\u7a0b\u5e8f\u8fd0\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u597d\u5728 linux \u63d0\u4f9b\u7684\u6709\u786c\u8fde\u63a5\u7279\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u5408\u7406\u7684\u5229\u7528\u8fd9\u4e2a\u7279\u6027\uff0c\u52a0\u5feb\u5220\u9664\u901f\u5ea6\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2022\/03\/drop.png\" alt=\"Linux\u786c\u8fde\u63a5\u7279\u6027\" \/><figcaption>Linux\u786c\u8fde\u63a5\u7279\u6027<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/xmt1139057136\/xttblog\/2022\/03\/drop1.png\" alt=\"\u8f6f\u94fe\u63a5\u548c\u786c\u94fe\u63a5\" \/><figcaption>\u8f6f\u94fe\u63a5\u548c\u786c\u94fe\u63a5<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u591a\u4e2a\u6587\u4ef6\u540d\u540c\u65f6\u6307\u5411\u540c\u4e00\u4e2a INODE \u65f6\uff0c\u8fd9\u4e2a INODE \u7684\u5f15\u7528\u6570 N &gt; 1\uff0c\u5220\u9664\u5176\u4e2d\u4efb\u4f55\u4e00\u4e2a\u6587\u4ef6\u540d\u90fd\u4f1a\u5f88\u5feb\u3002\u56e0\u4e3a\u5176\u76f4\u63a5\u7684\u7269\u7406\u6587\u4ef6\u5757\u6ca1\u6709\u88ab\u5220\u9664\uff0c\u53ea\u662f\u5220\u9664\u4e86\u4e00\u4e2a\u6307\u9488\u800c\u5df2\uff1b\u5f53 INODE \u7684\u5f15\u7528\u6570 N = 1 \u65f6\uff0c\u5220\u9664\u6587\u4ef6\u9700\u8981\u53bb\u628a\u8fd9\u4e2a\u6587\u4ef6\u76f8\u5173\u7684\u6240\u6709\u6570\u636e\u5757\u6e05\u9664\uff0c\u6240\u4ee5\u4f1a\u6bd4\u8f83\u8017\u65f6\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u6b64\uff0c\u6211\u4eec\u53ef\u4ee5\u5408\u7406\u7684\u5229\u7528\u8fd9\u4e2a\u673a\u5236\uff0c\u7ed9\u6570\u636e\u5e93\u8868\u7684 .ibd \u6587\u4ef6\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u786c\u94fe\u63a5\u3002\u5f53\u5220\u9664\u8868\u65f6\uff0c\u5220\u9664\u7269\u7406\u6587\u4ef6\u65f6\uff0c\u5176\u5b9e\u5220\u9664\u7684\u5c31\u662f\u7269\u7406\u6587\u4ef6\u7684\u4e00\u4e2a\u6307\u9488\uff0c\u6240\u4ee5\u5220\u9664\u64cd\u4f5c\u54cd\u5e94\u901f\u5ea6\u4f1a\u975e\u5e38\u5feb\uff0c\u4e0d\u5230 1 \u79d2\u5c31\u80fd\u5b8c\u6210\u8fd9\u4e2a\u64cd\u4f5c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--\u00a0\u5148\u521b\u5efa\u8868\u6587\u4ef6\u7684\u786c\u94fe\u63a5\nln\u00a0table_test.ibd\u00a0table_test.ibd.bak\n--\u00a0\u5220\u9664\u8868\ndrop\u00a0table\u00a0table_test;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\u5c31\u662f\u8981\u771f\u6b63\u5220\u9664\u6389\u7269\u7406\u6587\u4ef6\uff0c\u91ca\u653e\u6587\u4ef6\u6240\u5360\u7528\u7684\u78c1\u76d8\u7a7a\u95f4\u3002\u8fd9\u4e00\u6b65\u6211\u5c31\u4e0d\u5c55\u5f00\u8bf4\u4e86\uff0c\u7f51\u4e0a\u6709\u5f88\u591a\u5de5\u5177\uff0c\u90fd\u53ef\u4ee5\u505a\u5230\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u8fd9\u91cc\u8bb2\u4e86\u5927\u8868\u7684 drop\uff0c\u540c\u6837\u7684\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u8fd9\u9002\u5408\u5927\u5e93 drop\u3002\u5982\u679c\u4e00\u4e2a\u6570\u636e\u5e93\u6bd4\u8f83\u5927\uff0c\u90a3\u6211\u4eec\u53ef\u4ee5\u5148\u5220\u9664\u5176\u4e2d\u8f83\u5927\u7684\u8868\uff0c\u6700\u540e\u5728\u6267\u884c DROP DATABASE \u5220\u9664\u6574\u4e2a\u5e93\uff0c\u5bf9\u5927\u8868\u7684\u5220\u9664\u53ef\u53c2\u89c1\u4e0a\u9762\u7684\u65b9\u6cd5\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=5338\">\u9762\u8bd5\u5b98\uff1a\u5982\u4f55\u5feb\u901f\u7684 drop \u6389\u4e00\u4e2a 100G \u7684\u5927\u8868\uff01<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u9762\u8bd5\u5b98\uff1a\u5982\u4f55\u5feb\u901f\u7684 drop \u6389\u4e00\u4e2a 100G \u7684\u5927\u8868\uff01 \u522b\u770b drop \u547d\u4ee4\u5f88\u7b80\u5355\uff0c\u4f46\u662f\u5f53\u6267\u884c\u65f6\u673a\u4e0d\u5bf9\uff0c\u6267\u884c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[580,94,447,1208,681],"class_list":["post-5338","post","type-post","status-publish","format-standard","hentry","category-sql","tag-mysql----dba","tag-mysqld","tag-mysql","tag-ondrop","tag-681"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5338"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5338\/revisions"}],"predecessor-version":[{"id":5339,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5338\/revisions\/5339"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}