create table b1 as select * from b建表锁表测试
A: create table a1 like a; insert into a1 as select * from a;
B: create table b1 as select * from b;
测试AB两种建表语句对原始表的影响。其中a、b的数据量均为300000 rows。
如果使用A种方式建表,insert过程可能会堵塞DML操作
如果使用B中方式建表,此建表过程全程锁表;
建议:生产环境使用A种方式建备份表;
create table b1 as select * from b建表锁表测试的更多相关文章
- hive基本的操作语句(实例简单易懂,create table XX as select XX)
hive建表语句DML:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Cr ...
- create table xxx as select 与 create table xxx like
create table xxx ) | NO | PRI | NULL | auto_increment | | Name | varchar() | NO | ...
- create table repo_folder_operate_log_bak as select * from repo_folder_operate_log;
create table repo_folder_operate_log_bak as select * from repo_folder_operate_log;
- MongoDB 实现 create table tab2 as select
1. var result = db.foo.aggregate(...);db.bar.insert(result.result); 2. var temp1 = db.mtb1.find(name ...
- create table:使用SELECT语句创建表
oracle下直接(创建表) create table newtablename as select * from oldtablename sqlserver的语法是(自动创建表) : select ...
- 用复制方式创建表 Create Table tbname as select * from user.tab where ...
用复制方式创建表 Create Table tbname as select * from user.tab where ...
- create table test_create_table_CreateAs as select * from test_create_table; 表结构的破坏 复制字段结构 复制表结构 LIKE
案例中: 索引丢失.分区丢失 实际测试 Target Server Type : MYSQLTarget Server Version : 50616File Encoding : 65001 Dat ...
- Create table as select
create table xxx as select create table table1 =; 根据table2的表结构,创建tables1 create table table1 as sele ...
- oracle数据库【表复制】insert into select from跟create table as select * from 两种表复制语句区别
create table as select * from和insert into select from两种表复制语句区别 create table targer_table as select ...
随机推荐
- java 基础之--传统网络编程
什么是socket ? socket 是连接运行在网络上的两个程序间的双向通讯端点 服务器将某一套接字绑定到一个特定的端口,并通过这一套接字等待和监听客户端的的连接请求 客户端通过这个端口与服务器进行 ...
- Mysql的随机抽取
方法一 SELECT * FROM SHARE ORDER BY RAND( ) LIMIT 1; 在MYSQL的官方手册,里面针对RAND()的提示大概意思就是,在ORDER BY从句里面不能使用R ...
- Specified key was too long; max key length is 767 bytes
MySQL) )); Database changed ERROR (): Specified bytes drop table if exists test; ) primary key)chars ...
- Tomcat配置远程调试端口(windows、Linux)
当我们需要定位生产环境问题,而日志又不清晰的情况下,我们可以借助Tomcat提供的远程调试,设置如下: // Linxu系统: apach/bin/startup.sh开始处中增加如下内容: decl ...
- pom.xml中坐标的组成
坐标=组织(也就是所谓的公司名称)+项目名称+版本(如果不加范围默认为compile)
- 转录组的组装Stingtie和Cufflinks
转录组的组装Stingtie和Cufflinks Posted: 十月 18, 2017 Under: Transcriptomics By Kai no Comments 首先这两款软件都是用 ...
- 论坛:获取当前原始请求中的远程IP地址
topic.setIpAddr(ServletActionContext.getRequest().getRemoteAddr());//当前原始请求中的远程IP地址
- sqli-labs:7,导入导出;8-10 延时注入
1,Load_file()导出文件 使用条件: A.必须有权限读取并且文件必须完全可读(and (select count(*) from mysql.user)>0/* 如果结果返回正常,说明 ...
- spring boot 启动自动跳到 断点 throw new SilentExitException
项目 debug 启动,自动跳到 断点 ,而且就算F8 ,项目还是停止启动. 百度了一下,答案都是 Eclipse -> Preferences ->Java ->Debug去掉&q ...
- 算法题思路总结和leecode继续历程
2018-05-03 刷了牛客网的题目:总结思路(总的思路跟数学一样就是化简和转化) 具体启发点: 1.对数据进行预处理排序的思想:比如8皇后问题 2.对一个数组元素进行比较的操作,如果复杂,可以试试 ...