文档章节

PHPWIND 9 mysql大容量数据库碎片清理方法

07911
 07911
发布于 2017/05/01 00:08
字数 1103
阅读 35
收藏 0

主要是之前用火车采集高了很多内容,数据库每次备份的时候都是几十个G,后来查看数据库的时候其实内容并没有这么多,但是因为mysql高版本innoDB的原因,导致数据库有大量的碎片,所以只能手动清理,研究了很多网上的教程和方法,但是都不理想,几个方法测试后清理效果都不太理想,所以想了一个比较笨的办法:直接将数据表类型转换成myisam,具体SQL代码如下:

ALTER TABLE  `pw_acloud_apis` ENGINE = myisam;

其中`pw_acloud_apis`是数据表名称;

技巧:通过各种工具得到程序所有表名,excel拉出所有表的语法,然后一起执行即可例如:

ALTER TABLE `pw_acloud_apis` ENGINE = MyISAM;
ALTER TABLE `pw_acloud_app_configs` ENGINE = MyISAM;
ALTER TABLE `pw_acloud_apps` ENGINE = MyISAM;
ALTER TABLE `pw_acloud_extras` ENGINE = MyISAM;
ALTER TABLE `pw_acloud_keys` ENGINE = MyISAM;
ALTER TABLE `pw_acloud_sql_log` ENGINE = MyISAM;
ALTER TABLE `pw_acloud_table_settings` ENGINE = MyISAM;
ALTER TABLE `pw_admin_auth` ENGINE = MyISAM;
ALTER TABLE `pw_admin_config` ENGINE = MyISAM;
ALTER TABLE `pw_admin_custom` ENGINE = MyISAM;
ALTER TABLE `pw_admin_role` ENGINE = MyISAM;
ALTER TABLE `pw_advertisement` ENGINE = MyISAM;
ALTER TABLE `pw_announce` ENGINE = MyISAM;
ALTER TABLE `pw_app_majia` ENGINE = MyISAM;
ALTER TABLE `pw_app_mark_record` ENGINE = MyISAM;
ALTER TABLE `pw_app_poll` ENGINE = MyISAM;
ALTER TABLE `pw_app_poll_option` ENGINE = MyISAM;
ALTER TABLE `pw_app_poll_thread` ENGINE = MyISAM;
ALTER TABLE `pw_app_poll_voter` ENGINE = MyISAM;
ALTER TABLE `pw_app_search_record` ENGINE = MyISAM;
ALTER TABLE `pw_app_weibojifen_address` ENGINE = MyISAM;
ALTER TABLE `pw_app_weibojifen_order` ENGINE = MyISAM;
ALTER TABLE `pw_app_weibojifen_prize` ENGINE = MyISAM;
ALTER TABLE `pw_app_withdraw` ENGINE = MyISAM;
ALTER TABLE `pw_app_withdraw_list` ENGINE = MyISAM;
ALTER TABLE `pw_application` ENGINE = MyISAM;
ALTER TABLE `pw_application_log` ENGINE = MyISAM;
ALTER TABLE `pw_attachs` ENGINE = MyISAM;
ALTER TABLE `pw_attachs_thread` ENGINE = MyISAM;
ALTER TABLE `pw_attachs_thread_buy` ENGINE = MyISAM;
ALTER TABLE `pw_attachs_thread_download` ENGINE = MyISAM;
ALTER TABLE `pw_attention` ENGINE = MyISAM;
ALTER TABLE `pw_attention_fresh` ENGINE = MyISAM;
ALTER TABLE `pw_attention_fresh_index` ENGINE = MyISAM;
ALTER TABLE `pw_attention_fresh_relations` ENGINE = MyISAM;
ALTER TABLE `pw_attention_recommend_cron` ENGINE = MyISAM;
ALTER TABLE `pw_attention_recommend_friends` ENGINE = MyISAM;
ALTER TABLE `pw_attention_recommend_record` ENGINE = MyISAM;
ALTER TABLE `pw_attention_type` ENGINE = MyISAM;
ALTER TABLE `pw_attention_type_relations` ENGINE = MyISAM;
ALTER TABLE `pw_banner` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_forum` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_forum_extra` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_forum_life` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_forum_statistics` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_forum_user` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_posts` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_posts_place` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_posts_reply` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_posts_topped` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_specialsort` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_buy` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_cate_index` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_content` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_digest_index` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_hits` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_index` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_overtime` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_place` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_sort` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_threads_weight` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_topic_type` ENGINE = MyISAM;
ALTER TABLE `pw_bbs_topped` ENGINE = MyISAM;
ALTER TABLE `pw_bbsinfo` ENGINE = MyISAM;
ALTER TABLE `pw_cache` ENGINE = MyISAM;
ALTER TABLE `pw_collect_content` ENGINE = MyISAM;
ALTER TABLE `pw_common_config` ENGINE = MyISAM;
ALTER TABLE `pw_common_cron` ENGINE = MyISAM;
ALTER TABLE `pw_common_emotion` ENGINE = MyISAM;
ALTER TABLE `pw_common_emotion_category` ENGINE = MyISAM;
ALTER TABLE `pw_common_nav` ENGINE = MyISAM;
ALTER TABLE `pw_common_process` ENGINE = MyISAM;
ALTER TABLE `pw_credit_log` ENGINE = MyISAM;
ALTER TABLE `pw_credit_log_operate` ENGINE = MyISAM;
ALTER TABLE `pw_design_bak` ENGINE = MyISAM;
ALTER TABLE `pw_design_component` ENGINE = MyISAM;
ALTER TABLE `pw_design_cron` ENGINE = MyISAM;
ALTER TABLE `pw_design_data` ENGINE = MyISAM;
ALTER TABLE `pw_design_image` ENGINE = MyISAM;
ALTER TABLE `pw_design_module` ENGINE = MyISAM;
ALTER TABLE `pw_design_page` ENGINE = MyISAM;
ALTER TABLE `pw_design_permissions` ENGINE = MyISAM;
ALTER TABLE `pw_design_portal` ENGINE = MyISAM;
ALTER TABLE `pw_design_push` ENGINE = MyISAM;
ALTER TABLE `pw_design_script` ENGINE = MyISAM;
ALTER TABLE `pw_design_segment` ENGINE = MyISAM;
ALTER TABLE `pw_design_shield` ENGINE = MyISAM;
ALTER TABLE `pw_design_structure` ENGINE = MyISAM;
ALTER TABLE `pw_domain` ENGINE = MyISAM;
ALTER TABLE `pw_draft` ENGINE = MyISAM;
ALTER TABLE `pw_frag_template` ENGINE = MyISAM;
ALTER TABLE `pw_fresh_site` ENGINE = MyISAM;
ALTER TABLE `pw_hook` ENGINE = MyISAM;
ALTER TABLE `pw_hook_inject` ENGINE = MyISAM;
ALTER TABLE `pw_invite_code` ENGINE = MyISAM;
ALTER TABLE `pw_like_content` ENGINE = MyISAM;
ALTER TABLE `pw_like_log` ENGINE = MyISAM;
ALTER TABLE `pw_like_source` ENGINE = MyISAM;
ALTER TABLE `pw_like_statistics` ENGINE = MyISAM;
ALTER TABLE `pw_like_tag` ENGINE = MyISAM;
ALTER TABLE `pw_like_tag_relations` ENGINE = MyISAM;
ALTER TABLE `pw_link` ENGINE = MyISAM;
ALTER TABLE `pw_link_relations` ENGINE = MyISAM;
ALTER TABLE `pw_link_type` ENGINE = MyISAM;
ALTER TABLE `pw_log` ENGINE = MyISAM;
ALTER TABLE `pw_log_login` ENGINE = MyISAM;
ALTER TABLE `pw_medal_info` ENGINE = MyISAM;
ALTER TABLE `pw_medal_log` ENGINE = MyISAM;
ALTER TABLE `pw_medal_user` ENGINE = MyISAM;
ALTER TABLE `pw_message_config` ENGINE = MyISAM;
ALTER TABLE `pw_message_notices` ENGINE = MyISAM;
ALTER TABLE `pw_online_guest` ENGINE = MyISAM;
ALTER TABLE `pw_online_statistics` ENGINE = MyISAM;
ALTER TABLE `pw_online_user` ENGINE = MyISAM;
ALTER TABLE `pw_pay_order` ENGINE = MyISAM;
ALTER TABLE `pw_recycle_reply` ENGINE = MyISAM;
ALTER TABLE `pw_recycle_topic` ENGINE = MyISAM;
ALTER TABLE `pw_remind` ENGINE = MyISAM;
ALTER TABLE `pw_report` ENGINE = MyISAM;
ALTER TABLE `pw_seo` ENGINE = MyISAM;
ALTER TABLE `pw_space` ENGINE = MyISAM;
ALTER TABLE `pw_space_domain` ENGINE = MyISAM;
ALTER TABLE `pw_style` ENGINE = MyISAM;
ALTER TABLE `pw_tag` ENGINE = MyISAM;
ALTER TABLE `pw_tag_attention` ENGINE = MyISAM;
ALTER TABLE `pw_tag_category` ENGINE = MyISAM;
ALTER TABLE `pw_tag_category_relation` ENGINE = MyISAM;
ALTER TABLE `pw_tag_record` ENGINE = MyISAM;
ALTER TABLE `pw_tag_relation` ENGINE = MyISAM;
ALTER TABLE `pw_task` ENGINE = MyISAM;
ALTER TABLE `pw_task_cache` ENGINE = MyISAM;
ALTER TABLE `pw_task_group` ENGINE = MyISAM;
ALTER TABLE `pw_task_user` ENGINE = MyISAM;
ALTER TABLE `pw_upgrade_log` ENGINE = MyISAM;
ALTER TABLE `pw_user` ENGINE = MyISAM;
ALTER TABLE `pw_user_active_code` ENGINE = MyISAM;
ALTER TABLE `pw_user_ban` ENGINE = MyISAM;
ALTER TABLE `pw_user_behavior` ENGINE = MyISAM;
ALTER TABLE `pw_user_belong` ENGINE = MyISAM;
ALTER TABLE `pw_user_data` ENGINE = MyISAM;
ALTER TABLE `pw_user_education` ENGINE = MyISAM;
ALTER TABLE `pw_user_groups` ENGINE = MyISAM;
ALTER TABLE `pw_user_info` ENGINE = MyISAM;
ALTER TABLE `pw_user_login_ip_recode` ENGINE = MyISAM;
ALTER TABLE `pw_user_mobile` ENGINE = MyISAM;
ALTER TABLE `pw_user_mobile_verify` ENGINE = MyISAM;
ALTER TABLE `pw_user_open_account` ENGINE = MyISAM;
ALTER TABLE `pw_user_permission_groups` ENGINE = MyISAM;
ALTER TABLE `pw_user_register_check` ENGINE = MyISAM;
ALTER TABLE `pw_user_register_ip` ENGINE = MyISAM;
ALTER TABLE `pw_user_tag` ENGINE = MyISAM;
ALTER TABLE `pw_user_tag_relation` ENGINE = MyISAM;
ALTER TABLE `pw_user_work` ENGINE = MyISAM;
ALTER TABLE `pw_weibo` ENGINE = MyISAM;
ALTER TABLE `pw_weibo_comment` ENGINE = MyISAM;
ALTER TABLE `pw_windid_admin_auth` ENGINE = MyISAM;
ALTER TABLE `pw_windid_admin_config` ENGINE = MyISAM;
ALTER TABLE `pw_windid_admin_custom` ENGINE = MyISAM;
ALTER TABLE `pw_windid_admin_role` ENGINE = MyISAM;
ALTER TABLE `pw_windid_app` ENGINE = MyISAM;
ALTER TABLE `pw_windid_application` ENGINE = MyISAM;
ALTER TABLE `pw_windid_application_log` ENGINE = MyISAM;
ALTER TABLE `pw_windid_area` ENGINE = MyISAM;
ALTER TABLE `pw_windid_config` ENGINE = MyISAM;
ALTER TABLE `pw_windid_hook` ENGINE = MyISAM;
ALTER TABLE `pw_windid_hook_inject` ENGINE = MyISAM;
ALTER TABLE `pw_windid_message` ENGINE = MyISAM;
ALTER TABLE `pw_windid_message_dialog` ENGINE = MyISAM;
ALTER TABLE `pw_windid_message_relation` ENGINE = MyISAM;
ALTER TABLE `pw_windid_notify` ENGINE = MyISAM;
ALTER TABLE `pw_windid_notify_log` ENGINE = MyISAM;
ALTER TABLE `pw_windid_school` ENGINE = MyISAM;
ALTER TABLE `pw_windid_user` ENGINE = MyISAM;
ALTER TABLE `pw_windid_user_black` ENGINE = MyISAM;
ALTER TABLE `pw_windid_user_data` ENGINE = MyISAM;
ALTER TABLE `pw_windid_user_info` ENGINE = MyISAM;
ALTER TABLE `pw_word` ENGINE = MyISAM;

 

© 著作权归作者所有

07911
粉丝 0
博文 20
码字总数 4778
作品 0
成都
程序员
私信 提问
WindPT 0.9.5 RC 发布,PHPWind PT 插件

WindPT 0.9.5 RC 发布,为 WindPT 带来了诸多细节上的改进。 0.9.5 rc 主要改进如下: 权限限制的增强 个人页面注入内容使用模板文件(丰富个人页面注入内容) AJAX 改用 Wind.js API 合并 ...

kinosang
2015/12/13
502
5
WindPT 0.9.3 发布,PHPWind PT 插件

WindPT 0.9.3 发布,针对 0.9.2 RC 修正了一些 bug 和不严谨的地方。 0.9.3 主要改动: 修正两个计划任务文件的逻辑 移动配置信息 app.torrent.pt_threads 到 命名空间 app.torrent.theme 下...

kinosang
2015/09/21
1K
8
WindPT 0.9.4 发布,PHPWind PT 插件

WindPT 0.9.4 发布,修正 0.9.4 RC 中的问题。 0.9.4 主要改进如下: 修正多处小bug 使用 EvalMath 类处理积分计算 在浏览器中打开tracker时跳转到主页 新 Logo indPT 是 PHPWind 9 的 PT T...

kinosang
2015/11/03
1K
3
国内开源社区软件 PHPWind 团队已解散

2月11日消息 近日有消息称,国内开源社区软件phpwind团队已解散。 公开资料显示,phpwind简称PW,是一个基于PHP和MySQL的论坛程序。其前身是ofstar,发布于2004年。2008年5月phpwind加入阿里...

panpanhtai
2014/02/11
15.6K
52
阿里巴巴欲借PHPWind中小站免费推广淘宝

4月13日消息,阿里巴巴旗下通用建站软件开发商PHPWind今日正式亮相,PHPWind CEO王学集在新闻发布会上宣布,区域网站可免费使用PHPWind开设社区,并可藉此在网站内导入淘宝卖家资源、支付宝信...

红薯
2010/04/13
643
1

没有更多内容

加载失败,请刷新页面

加载更多

只需一步,在Spring Boot中统一Restful API返回值格式与统一处理异常

统一返回值 在前后端分离大行其道的今天,有一个统一的返回值格式不仅能使我们的接口看起来更漂亮,而且还可以使前端可以统一处理很多东西,避免很多问题的产生。 比较通用的返回值格式如下:...

晓月寒丶
今天
58
0
区块链应用到供应链上的好处和实际案例

区块链可以解决供应链中的很多问题,例如记录以及追踪产品。那么使用区块链应用到各产品供应链上到底有什么好处?猎头悬赏平台解优人才网小编给大家做个简单的分享: 使用区块链的最突出的优...

猎头悬赏平台
今天
27
0
全世界到底有多少软件开发人员?

埃文斯数据公司(Evans Data Corporation) 2019 最新的统计数据(原文)显示,2018 年全球共有 2300 万软件开发人员,预计到 2019 年底这个数字将达到 2640万,到 2023 年达到 2770万。 而来自...

红薯
今天
61
0
Go 语言基础—— 通道(channel)

通过通信来共享内存(Java是通过共享内存来通信的) 定义 func service() string {time.Sleep(time.Millisecond * 50)return "Done"}func AsyncService() chan string {retCh := mak......

刘一草
今天
57
0
Apache Flink 零基础入门(一):基础概念解析

Apache Flink 的定义、架构及原理 Apache Flink 是一个分布式大数据处理引擎,可对有限数据流和无限数据流进行有状态或无状态的计算,能够部署在各种集群环境,对各种规模大小的数据进行快速...

Vincent-Duan
今天
50
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部