pt-online-schema-change 实例
pt-pmp (http://www.cnblogs.com/ivictor/p/6012183.html)
pt-online-schema-change (http://blog.csdn.net/zengxuewen2045/article/details/52017416)
pt-query-digest (http://blog.csdn.net/wxc20062006/article/details/52387505)
用法介绍:
pt-online-schema-change [OPTIONS] DSN
options可以自行查看help,DNS为你要操作的数据库和表。
这里有两个参数需要介绍一下:
--dry-run 这个参数不建立触发器,不拷贝数据,也不会替换原表。只是创建和更改新表。
--execute 这个参数的作用和前面工作原理的介绍的一样,会建立触发器,来保证最新变更的数据会影响至新表。注意:如果不加这个参数,这个工具会在执行一些检查后退出。
使用示例:
在线更改表的的引擎,这个尤其在整理innodb表的时候非常有用,示例如下:
pt-online-schema-change --user=root --password=XXxx --host=localhost --lock-wait-time=120 --alter="ENGINE=InnoDB" D=test,t=oss_pvinfo2 --execute
--
在来一个范例,大表添加字段的,语句如下:
pt-online-schema-change --user=root --password=XXX --host=localhost --lock-wait-time=120 --alter="ADD COLUMN domain_id INT" D=test,t=oss_pvinfo2 --execute
pt-online-schema-change 实例的更多相关文章
- schema change + ogg 变更手册
Check OGG until no data queuing in replication process:testRO:a)login test5 –l oggmgrb)oggc)#ggsci ...
- Online Schema Change for MySQL
It is great to be able to build small utilities on top of an excellent RDBMS. Thank you MySQL. This ...
- AppBoxFuture(四). 随需而变-Online Schema Change
需求变更是信息化过程中的家常便饭,而在变更过程中如何尽可能小的影响在线业务是比较头疼的事情.举个车联网监控的例子:原终端设备上传车辆的经纬度数据,新的终端设备支持同时上传速度数据,而旧的车辆状态表 ...
- JSON Schema 校验实例
JSON Schema 简介 JSON Schema is a vocabulary that allows you to annotate and validate JSON documents. ...
- Online, Asynchronous Schema Change in F1
F1: A Distributed SQL Database That Scales http://disksing.com/understanding-f1-schema-change ma ...
- BizTalk开发系列(十五) Schema设计之Qualified 与Unqualified
XML Schema中的命名空间前缀限定包括对元素(Element)或属性(Attribute)的限定,即常见的如 “<ns0:root>...</ns0:root>”之类的格 ...
- Online Schema Upgrade in MySQL Galera Cluster using TOI Method
http://severalnines.com/blog/online-schema-upgrade-mysql-galera-cluster-using-toi-method As a fo ...
- python面向对象之类属性,实例属性
python中的属性分为类属性和实例属性,之前已经说过一些,这里主要是对类属性与实例属性的增删改查 首先是对类属性的增删改查,下面这个是对类属性的修改,在书写类时,已经对类属性occupation进行 ...
- Schema 与数据类型优化
这是<高性能 MySQL(第三版)>第四章<Schema 与数据类型优化>的读书笔记. 1. 选择优化的数据类型 数据类型的选择原则: 越小越好:选择满足需求的最小类型.注意, ...
- async-validator 源码学习笔记(五):Schema
系列文章: 1.async-validator 源码学习(一):文档翻译 2.async-validator 源码学习笔记(二):目录结构 3.async-validator 源码学习笔记(三):ru ...
随机推荐
- iOS中JS 与OC的交互(JavaScriptCore.framework)
iOS中实现js与oc的交互,目前网上也有不少流行的开源解决方案: 如:react native 当然一些轻量级的任务使用系统提供的UIWebView 以及JavaScriptCore.framewo ...
- miniui设置边框的方法
if (field == "loginname") { if (record._id == 2) { e.cellHtml = ""; e.cellStyle ...
- springmvcIntercept(拦截器)
1.创建拦截器 public class MyIntercept implements HandlerInterceptor { @Override public void afterCompleti ...
- ListView.DragEnter触发不了
经过千百度的搜索之后,终于找到了一点线索,原文是:https://msdn.microsoft.com/en-us/magazine/mt185571.aspx 有能力的可以参阅原文,想省事的可以等待 ...
- Android开发--Layout元素
1.TF类型 android:layout_alignParentStart="true/flase":贴紧父元素的左边缘 android:layout_alignParentEn ...
- HDU 1253 胜利大逃亡
Problem Description Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C ...
- git push (第一次) (转)
原地址 http://blog.csdn.net/kazeik/article/details/9113891 下图是github在创建仓库后给的提示:按它一步步操作下去就可以了. 下图是在git命 ...
- Winform TreeList递归绑定树节点
/// <summary> /// 绑定树目录 /// </summary> /// <param name="parentId">父ID< ...
- Windows 7中无法访问FTP的解决方法
解决: netsh advfirewall set global StatefulFTP disable
- Topcoder SRM 583 DIV2 SwappingDigits
题目题意是交换一次,使数字最小,且数字前面不能有前导0 string minNumber(string num) { string res = num; for(int i = 0 ; i < ...